@@ -11,7 +11,7 @@ LL | fn bar() -> Wrapper<'static, impl Sized>;
1111 | ++++++++
1212
1313error[E0106]: missing lifetime specifier
14- --> $DIR/opaque-and-lifetime-mismatch.rs:18 :24
14+ --> $DIR/opaque-and-lifetime-mismatch.rs:16 :24
1515 |
1616LL | fn foo() -> Wrapper<impl Sized>;
1717 | ^ expected named lifetime parameter
@@ -23,7 +23,7 @@ LL | fn foo() -> Wrapper<'static, impl Sized>;
2323 | ++++++++
2424
2525error[E0106]: missing lifetime specifier
26- --> $DIR/opaque-and-lifetime-mismatch.rs:24 :24
26+ --> $DIR/opaque-and-lifetime-mismatch.rs:22 :24
2727 |
2828LL | fn foo() -> Wrapper<impl Sized> {
2929 | ^ expected named lifetime parameter
@@ -49,7 +49,7 @@ LL | struct Wrapper<'rom>(&'rom ());
4949 | ^^^^^^^
5050
5151error[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
5353 |
5454LL | fn foo() -> Wrapper<impl Sized>;
5555 | ^^^^^^^ ---------- help: remove the unnecessary generic argument
@@ -62,36 +62,8 @@ note: struct defined here, with 0 generic parameters
6262LL | struct Wrapper<'rom>(&'rom ());
6363 | ^^^^^^^
6464
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-
9365error[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
9567 |
9668LL | fn foo() -> Wrapper<impl Sized> {
9769 | ^^^^^^^ ---------- help: remove the unnecessary generic argument
@@ -104,7 +76,7 @@ note: struct defined here, with 0 generic parameters
10476LL | struct Wrapper<'rom>(&'rom ());
10577 | ^^^^^^^
10678
107- error: aborting due to 8 previous errors
79+ error: aborting due to 6 previous errors
10880
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