We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5be51f2 + 593fd7c commit ae58c51Copy full SHA for ae58c51
src/test/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs
@@ -7,27 +7,24 @@ pub trait MyTrait {}
7
8
impl MyTrait for bool {}
9
10
+type Foo = impl MyTrait;
11
+
12
struct Blah {
13
my_foo: Foo,
- my_u8: u8
14
+ my_u8: u8,
15
}
16
17
impl Blah {
18
fn new() -> Blah {
- Blah {
- my_foo: make_foo(),
19
- my_u8: 12
20
- }
+ Blah { my_foo: make_foo(), my_u8: 12 }
21
22
- fn into_inner(self) -> (Foo, u8) {
23
- (self.my_foo, self.my_u8)
+ fn into_inner(self) -> (Foo, u8, Foo) {
+ (self.my_foo, self.my_u8, make_foo())
24
25
26
27
fn make_foo() -> Foo {
28
true
29
30
31
-type Foo = impl MyTrait;
32
-
33
fn main() {}
0 commit comments