]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs
unboxed-closures and type-alias-impl-trait nll revisions
[rust.git] / src / test / ui / type-alias-impl-trait / type-alias-impl-trait-tuple.rs
1 // check-pass
2
3 #![feature(type_alias_impl_trait)]
4 #![allow(dead_code)]
5
6 pub trait MyTrait {}
7
8 impl MyTrait for bool {}
9
10 type Foo = impl MyTrait;
11
12 struct Blah {
13     my_foo: Foo,
14     my_u8: u8,
15 }
16
17 impl Blah {
18     fn new() -> Blah {
19         Blah { my_foo: make_foo(), my_u8: 12 }
20     }
21     fn into_inner(self) -> (Foo, u8, Foo) {
22         (self.my_foo, self.my_u8, make_foo())
23     }
24 }
25
26 fn make_foo() -> Foo {
27     true
28 }
29
30 fn main() {}