diff options
| author | Jack Huey <jack.huey@umassmed.edu> | 2021-02-27 21:31:56 -0500 |
|---|---|---|
| committer | Jack Huey <jack.huey@umassmed.edu> | 2021-03-24 16:45:41 -0400 |
| commit | 19ecfcd0e2ae01c79159888a45042a5d6f4ed487 (patch) | |
| tree | cd5e3efeef464b6517ca0bb6e69a4f8f3a9a8169 /src/test/ui/methods | |
| parent | f5fe425c925ef36d5f4c18cfa44173fc42de31b8 (diff) | |
| download | rust-19ecfcd0e2ae01c79159888a45042a5d6f4ed487.tar.gz rust-19ecfcd0e2ae01c79159888a45042a5d6f4ed487.zip | |
resolve late lifetimes by item
This reverts commit 22ae20733515d710c1134600bc1e29cdd76f6b9b.
Diffstat (limited to 'src/test/ui/methods')
| -rw-r--r-- | src/test/ui/methods/method-call-lifetime-args-unresolved.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/methods/method-call-lifetime-args-unresolved.stderr | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/test/ui/methods/method-call-lifetime-args-unresolved.rs b/src/test/ui/methods/method-call-lifetime-args-unresolved.rs index d16ba3df47b..d7760985ec6 100644 --- a/src/test/ui/methods/method-call-lifetime-args-unresolved.rs +++ b/src/test/ui/methods/method-call-lifetime-args-unresolved.rs @@ -1,3 +1,5 @@ fn main() { 0.clone::<'a>(); //~ ERROR use of undeclared lifetime name `'a` + //~^ WARNING cannot specify lifetime arguments + //~| WARNING this was previously accepted } diff --git a/src/test/ui/methods/method-call-lifetime-args-unresolved.stderr b/src/test/ui/methods/method-call-lifetime-args-unresolved.stderr index 93c0384fcc2..5a958bc4b9c 100644 --- a/src/test/ui/methods/method-call-lifetime-args-unresolved.stderr +++ b/src/test/ui/methods/method-call-lifetime-args-unresolved.stderr @@ -1,3 +1,18 @@ +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 + | +LL | fn clone(&self) -> Self; + | - the late bound lifetime parameter is introduced here + | + = note: `#[warn(late_bound_lifetime_arguments)]` on by default + = 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> + error[E0261]: use of undeclared lifetime name `'a` --> $DIR/method-call-lifetime-args-unresolved.rs:2:15 | @@ -8,6 +23,6 @@ LL | 0.clone::<'a>(); | = help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes -error: aborting due to previous error +error: aborting due to previous error; 1 warning emitted For more information about this error, try `rustc --explain E0261`. |
