1
Fork 0

test TAIT in different positions

This commit is contained in:
Santiago Pastorino 2021-08-20 11:15:48 -03:00
parent a9ab2e5539
commit 593fd7c6b1
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF

View file

@ -7,20 +7,19 @@ 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())
}
}
@ -28,6 +27,4 @@ fn make_foo() -> Foo {
true
}
type Foo = impl MyTrait;
fn main() {}