@@ -11,7 +11,7 @@ LL | fn bar() -> Wrapper<'static, impl Sized>;
11
11
| ++++++++
12
12
13
13
error[E0106]: missing lifetime specifier
14
- --> $DIR/opaque-and-lifetime-mismatch.rs:18 :24
14
+ --> $DIR/opaque-and-lifetime-mismatch.rs:16 :24
15
15
|
16
16
LL | fn foo() -> Wrapper<impl Sized>;
17
17
| ^ expected named lifetime parameter
@@ -23,7 +23,7 @@ LL | fn foo() -> Wrapper<'static, impl Sized>;
23
23
| ++++++++
24
24
25
25
error[E0106]: missing lifetime specifier
26
- --> $DIR/opaque-and-lifetime-mismatch.rs:24 :24
26
+ --> $DIR/opaque-and-lifetime-mismatch.rs:22 :24
27
27
|
28
28
LL | fn foo() -> Wrapper<impl Sized> {
29
29
| ^ expected named lifetime parameter
@@ -49,7 +49,7 @@ LL | struct Wrapper<'rom>(&'rom ());
49
49
| ^^^^^^^
50
50
51
51
error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
52
- --> $DIR/opaque-and-lifetime-mismatch.rs:18 :17
52
+ --> $DIR/opaque-and-lifetime-mismatch.rs:16 :17
53
53
|
54
54
LL | fn foo() -> Wrapper<impl Sized>;
55
55
| ^^^^^^^ ---------- help: remove the unnecessary generic argument
@@ -62,36 +62,8 @@ note: struct defined here, with 0 generic parameters
62
62
LL | struct Wrapper<'rom>(&'rom ());
63
63
| ^^^^^^^
64
64
65
- error[E0053]: method `bar` has an incompatible return type for trait
66
- --> $DIR/opaque-and-lifetime-mismatch.rs:10:17
67
- |
68
- LL | fn bar() -> i32 {
69
- | ^^^
70
- | |
71
- | expected `Wrapper<'static>`, found `i32`
72
- | return type in trait
73
-
74
- error[E0053]: method `bar` has an incompatible type for trait
75
- --> $DIR/opaque-and-lifetime-mismatch.rs:10:17
76
- |
77
- LL | fn bar() -> i32 {
78
- | ^^^ expected `Wrapper<'static>`, found `i32`
79
- |
80
- note: type in trait
81
- --> $DIR/opaque-and-lifetime-mismatch.rs:4:17
82
- |
83
- LL | fn bar() -> Wrapper<impl Sized>;
84
- | ^^^^^^^^^^^^^^^^^^^
85
- = note: expected signature `fn() -> Wrapper<'static>`
86
- found signature `fn() -> i32`
87
- help: change the output type to match the trait
88
- |
89
- LL - fn bar() -> i32 {
90
- LL + fn bar() -> Wrapper<'static> {
91
- |
92
-
93
65
error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
94
- --> $DIR/opaque-and-lifetime-mismatch.rs:24 :17
66
+ --> $DIR/opaque-and-lifetime-mismatch.rs:22 :17
95
67
|
96
68
LL | fn foo() -> Wrapper<impl Sized> {
97
69
| ^^^^^^^ ---------- help: remove the unnecessary generic argument
@@ -104,7 +76,7 @@ note: struct defined here, with 0 generic parameters
104
76
LL | struct Wrapper<'rom>(&'rom ());
105
77
| ^^^^^^^
106
78
107
- error: aborting due to 8 previous errors
79
+ error: aborting due to 6 previous errors
108
80
109
- Some errors have detailed explanations: E0053, E0106, E0107.
110
- For more information about an error, try `rustc --explain E0053 `.
81
+ Some errors have detailed explanations: E0106, E0107.
82
+ For more information about an error, try `rustc --explain E0106 `.
0 commit comments