This doesn't mention that using an existing lifetime is possible, but that would hopefully be clear as always being an option. The intention of this is to teach newcomers what the lifetime syntax is.
12 lines
373 B
Plaintext
12 lines
373 B
Plaintext
error[E0261]: use of undeclared lifetime name `'a`
|
|
--> $DIR/method-call-lifetime-args-unresolved.rs:2:15
|
|
|
|
|
LL | fn main() {
|
|
| - help: consider introducing lifetime `'a` here: `<'a>`
|
|
LL | 0.clone::<'a>();
|
|
| ^^ undeclared lifetime
|
|
|
|
error: aborting due to previous error
|
|
|
|
For more information about this error, try `rustc --explain E0261`.
|