Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #![feature(type_alias_impl_trait)]
  2.  
  3. type Foo = impl core::fmt::Debug;
  4.  
  5. fn foo(bar: bool) -> Foo {
  6. if bar {
  7. println!("{:?}", foo(false));
  8. "true"
  9. } else {
  10. "false"
  11. }
  12. }
  13.  
  14. fn assert_send<T: Send>(_: T) {}
  15.  
  16. fn main() {
  17. assert_send(foo(true));
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement