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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
1014 B
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0261]: use of undeclared lifetime name `'a`
2018-12-25 09:56:47 -06:00
--> $DIR/method-call-lifetime-args-unresolved.rs:2:15
2018-08-08 07:28:26 -05:00
|
LL | fn main() {
| - help: consider introducing lifetime `'a` here: `<'a>`
2019-03-09 06:03:44 -06:00
LL | 0.clone::<'a>();
2018-08-08 07:28:26 -05:00
| ^^ undeclared lifetime
2022-03-06 08:44:48 -06: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 08:44:48 -06:00
|
= note: the late bound lifetime parameter is introduced here
2022-03-06 08:44:48 -06: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 10:55:36 -05:00
= note: `#[warn(late_bound_lifetime_arguments)]` on by default
2022-03-06 08:44:48 -06:00
error: aborting due to previous error; 1 warning emitted
2018-08-08 07:28:26 -05:00
For more information about this error, try `rustc --explain E0261`.