Rollup merge of #88183 - spastorino:add-tait-in-different-tuple-position, r=oli-obk
test TAIT in different positions r? `@oli-obk` Related to #86727
This commit is contained in:
commit
ae58c51fe7
1 changed files with 6 additions and 9 deletions
|
@ -7,20 +7,19 @@ pub trait MyTrait {}
|
||||||
|
|
||||||
impl MyTrait for bool {}
|
impl MyTrait for bool {}
|
||||||
|
|
||||||
|
type Foo = impl MyTrait;
|
||||||
|
|
||||||
struct Blah {
|
struct Blah {
|
||||||
my_foo: Foo,
|
my_foo: Foo,
|
||||||
my_u8: u8
|
my_u8: u8,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Blah {
|
impl Blah {
|
||||||
fn new() -> Blah {
|
fn new() -> Blah {
|
||||||
Blah {
|
Blah { my_foo: make_foo(), my_u8: 12 }
|
||||||
my_foo: make_foo(),
|
|
||||||
my_u8: 12
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
fn into_inner(self) -> (Foo, u8) {
|
fn into_inner(self) -> (Foo, u8, Foo) {
|
||||||
(self.my_foo, self.my_u8)
|
(self.my_foo, self.my_u8, make_foo())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +27,4 @@ fn make_foo() -> Foo {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
type Foo = impl MyTrait;
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
Loading…
Reference in a new issue