Skip to content

Commit

Permalink
test TAIT in different positions
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed Aug 20, 2021
1 parent a9ab2e5 commit 593fd7c
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/test/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs
Expand Up @@ -7,27 +7,24 @@ pub trait MyTrait {}

impl MyTrait for bool {}

type Foo = impl MyTrait;

struct Blah {
my_foo: Foo,
my_u8: u8
my_u8: u8,
}

impl Blah {
fn new() -> Blah {
Blah {
my_foo: make_foo(),
my_u8: 12
}
Blah { my_foo: make_foo(), my_u8: 12 }
}
fn into_inner(self) -> (Foo, u8) {
(self.my_foo, self.my_u8)
fn into_inner(self) -> (Foo, u8, Foo) {
(self.my_foo, self.my_u8, make_foo())
}
}

fn make_foo() -> Foo {
true
}

type Foo = impl MyTrait;

fn main() {}

0 comments on commit 593fd7c

Please sign in to comment.