You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -10,19 +10,32 @@ help: consider using the `'static` lifetime, but this is uncommon unless you're
10
10
LL | fn bar() -> Wrapper<'static, impl Sized>;
11
11
| ++++++++
12
12
13
-
error[E0412]: cannot find type `T` in this scope
14
-
--> $DIR/opaque-and-lifetime-mismatch.rs:1:22
13
+
error[E0106]: missing lifetime specifier
14
+
--> $DIR/opaque-and-lifetime-mismatch.rs:18:24
15
+
|
16
+
LL | fn foo() -> Wrapper<impl Sized>;
17
+
| ^ expected named lifetime parameter
18
+
|
19
+
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
20
+
help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
21
+
|
22
+
LL | fn foo() -> Wrapper<'static, impl Sized>;
23
+
| ++++++++
24
+
25
+
error[E0106]: missing lifetime specifier
26
+
--> $DIR/opaque-and-lifetime-mismatch.rs:24:24
15
27
|
16
-
LL | struct Wrapper<'rom>(T);
17
-
| ^ not found in this scope
28
+
LL | fn foo() -> Wrapper<impl Sized> {
29
+
| ^ expected named lifetime parameter
18
30
|
19
-
help: you might be missing a type parameter
31
+
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
32
+
help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
20
33
|
21
-
LL | struct Wrapper<'rom, T>(T);
22
-
| +++
34
+
LL | fn foo() -> Wrapper<'static, impl Sized> {
35
+
| ++++++++
23
36
24
37
error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
25
-
--> $DIR/opaque-and-lifetime-mismatch.rs:5:17
38
+
--> $DIR/opaque-and-lifetime-mismatch.rs:4:17
26
39
|
27
40
LL | fn bar() -> Wrapper<impl Sized>;
28
41
| ^^^^^^^ ---------- help: remove this generic argument
0 commit comments