mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
43 lines
1.4 KiB
Plaintext
43 lines
1.4 KiB
Plaintext
error[E0261]: use of undeclared lifetime name `'a`
|
|
--> $DIR/bad-item-bound-within-rpitit-2.rs:5:20
|
|
|
|
|
LL | fn bar<'other: 'a>() -> impl Sized + 'a {}
|
|
| ^^ undeclared lifetime
|
|
|
|
|
help: consider introducing lifetime `'a` here
|
|
|
|
|
LL | fn bar<'a, 'other: 'a>() -> impl Sized + 'a {}
|
|
| +++
|
|
help: consider introducing lifetime `'a` here
|
|
|
|
|
LL | trait Foo<'a> {
|
|
| ++++
|
|
|
|
error[E0261]: use of undeclared lifetime name `'a`
|
|
--> $DIR/bad-item-bound-within-rpitit-2.rs:5:42
|
|
|
|
|
LL | fn bar<'other: 'a>() -> impl Sized + 'a {}
|
|
| ^^ undeclared lifetime
|
|
|
|
|
help: consider introducing lifetime `'a` here
|
|
|
|
|
LL | fn bar<'a, 'other: 'a>() -> impl Sized + 'a {}
|
|
| +++
|
|
help: consider introducing lifetime `'a` here
|
|
|
|
|
LL | trait Foo<'a> {
|
|
| ++++
|
|
|
|
error[E0792]: expected generic lifetime parameter, found `'static`
|
|
--> $DIR/bad-item-bound-within-rpitit-2.rs:5:45
|
|
|
|
|
LL | fn bar<'other: 'a>() -> impl Sized + 'a {}
|
|
| ------ ^^
|
|
| |
|
|
| cannot use static lifetime; use a bound lifetime instead or remove the lifetime parameter from the opaque type
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
Some errors have detailed explanations: E0261, E0792.
|
|
For more information about an error, try `rustc --explain E0261`.
|