os-rust/tests/ui/methods/method-call-lifetime-args-unresolved.stderr

25 lines
1,016 B
Text
Raw Normal View History

2018-08-08 14:28:26 +02:00
error[E0261]: use of undeclared lifetime name `'a`
2018-12-25 08:56:47 -07:00
--> $DIR/method-call-lifetime-args-unresolved.rs:2:15
2018-08-08 14:28:26 +02:00
|
LL | fn main() {
| - help: consider introducing lifetime `'a` here: `<'a>`
2019-03-09 15:03:44 +03:00
LL | 0.clone::<'a>();
2018-08-08 14:28:26 +02:00
| ^^ undeclared lifetime
2022-03-06 15:44:48 +01:00
warning: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
--> $DIR/method-call-lifetime-args-unresolved.rs:2:15
|
LL | 0.clone::<'a>();
| ^^
--> $SRC_DIR/core/src/clone.rs:LL:COL
2022-03-06 15:44:48 +01:00
|
= note: the late bound lifetime parameter is introduced here
2022-03-06 15:44:48 +01:00
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #42868 <https://github.com/rust-lang/rust/issues/42868>
2022-09-18 19:55:36 +04:00
= note: `#[warn(late_bound_lifetime_arguments)]` on by default
2022-03-06 15:44:48 +01:00
error: aborting due to 1 previous error; 1 warning emitted
2018-08-08 14:28:26 +02:00
For more information about this error, try `rustc --explain E0261`.