2024-03-08 02:45:52 +00:00
error[E0106]: missing lifetime specifier
2024-03-22 22:56:28 +01:00
--> $DIR/opaque-and-lifetime-mismatch.rs:4:24
2024-03-08 02:45:52 +00:00
|
LL | fn bar() -> Wrapper<impl Sized>;
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
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
|
LL | fn bar() -> Wrapper<'static, impl Sized>;
| ++++++++
2024-03-22 22:56:28 +01:00
error[E0106]: missing lifetime specifier
2025-03-03 05:14:52 +00:00
--> $DIR/opaque-and-lifetime-mismatch.rs:16:24
2024-03-22 22:56:28 +01:00
|
LL | fn foo() -> Wrapper<impl Sized>;
| ^ expected named lifetime parameter
|
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
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
|
LL | fn foo() -> Wrapper<'static, impl Sized>;
| ++++++++
error[E0106]: missing lifetime specifier
2025-03-03 05:14:52 +00:00
--> $DIR/opaque-and-lifetime-mismatch.rs:22:24
2024-03-08 02:45:52 +00:00
|
2024-03-22 22:56:28 +01:00
LL | fn foo() -> Wrapper<impl Sized> {
| ^ expected named lifetime parameter
2024-03-08 02:45:52 +00:00
|
2024-03-22 22:56:28 +01:00
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
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
2024-03-08 02:45:52 +00:00
|
2024-03-22 22:56:28 +01:00
LL | fn foo() -> Wrapper<'static, impl Sized> {
| ++++++++
2024-03-08 02:45:52 +00:00
error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
2024-03-22 22:56:28 +01:00
--> $DIR/opaque-and-lifetime-mismatch.rs:4:17
2024-03-08 02:45:52 +00:00
|
LL | fn bar() -> Wrapper<impl Sized>;
2024-07-22 22:51:53 +00:00
| ^^^^^^^ ---------- help: remove the unnecessary generic argument
| |
| expected 0 generic arguments
2024-03-08 02:45:52 +00:00
|
note: struct defined here, with 0 generic parameters
--> $DIR/opaque-and-lifetime-mismatch.rs:1:8
|
2024-03-22 22:56:28 +01:00
LL | struct Wrapper<'rom>(&'rom ());
| ^^^^^^^
error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
2025-03-03 05:14:52 +00:00
--> $DIR/opaque-and-lifetime-mismatch.rs:16:17
2024-03-22 22:56:28 +01:00
|
LL | fn foo() -> Wrapper<impl Sized>;
2024-07-22 22:51:53 +00:00
| ^^^^^^^ ---------- help: remove the unnecessary generic argument
| |
| expected 0 generic arguments
2024-03-22 22:56:28 +01:00
|
note: struct defined here, with 0 generic parameters
--> $DIR/opaque-and-lifetime-mismatch.rs:1:8
|
LL | struct Wrapper<'rom>(&'rom ());
2024-03-08 02:45:52 +00:00
| ^^^^^^^
2024-03-22 22:56:28 +01:00
error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
2025-03-03 05:14:52 +00:00
--> $DIR/opaque-and-lifetime-mismatch.rs:22:17
2024-03-22 22:56:28 +01:00
|
LL | fn foo() -> Wrapper<impl Sized> {
2024-07-22 22:51:53 +00:00
| ^^^^^^^ ---------- help: remove the unnecessary generic argument
| |
| expected 0 generic arguments
2024-03-22 22:56:28 +01:00
|
note: struct defined here, with 0 generic parameters
--> $DIR/opaque-and-lifetime-mismatch.rs:1:8
|
LL | struct Wrapper<'rom>(&'rom ());
| ^^^^^^^
2025-03-03 05:14:52 +00:00
error: aborting due to 6 previous errors
2024-03-08 02:45:52 +00:00
2025-03-03 05:14:52 +00:00
Some errors have detailed explanations: E0106, E0107.
For more information about an error, try `rustc --explain E0106`.