Skip to content

Commit ae58c51

Browse files
authored
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
2 parents 5be51f2 + 593fd7c commit ae58c51

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/test/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs

+6-9
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,24 @@ pub trait MyTrait {}
77

88
impl MyTrait for bool {}
99

10+
type Foo = impl MyTrait;
11+
1012
struct Blah {
1113
my_foo: Foo,
12-
my_u8: u8
14+
my_u8: u8,
1315
}
1416

1517
impl Blah {
1618
fn new() -> Blah {
17-
Blah {
18-
my_foo: make_foo(),
19-
my_u8: 12
20-
}
19+
Blah { my_foo: make_foo(), my_u8: 12 }
2120
}
22-
fn into_inner(self) -> (Foo, u8) {
23-
(self.my_foo, self.my_u8)
21+
fn into_inner(self) -> (Foo, u8, Foo) {
22+
(self.my_foo, self.my_u8, make_foo())
2423
}
2524
}
2625

2726
fn make_foo() -> Foo {
2827
true
2928
}
3029

31-
type Foo = impl MyTrait;
32-
3330
fn main() {}

0 commit comments

Comments
 (0)