diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-03-06 15:44:48 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-04-17 11:03:34 +0200 |
| commit | ca57bada05373ff227c661cc542e99c92b70c0ee (patch) | |
| tree | d39b8cce411cc824f562a7bd769d1b733438713a /src/test/ui/methods | |
| parent | fc9f25531a3681f0644267eb954d51f4b22ff5b7 (diff) | |
| download | rust-ca57bada05373ff227c661cc542e99c92b70c0ee.tar.gz rust-ca57bada05373ff227c661cc542e99c92b70c0ee.zip | |
Bless tests.
Diffstat (limited to 'src/test/ui/methods')
| -rw-r--r-- | src/test/ui/methods/method-call-lifetime-args-unresolved.rs | 5 | ||||
| -rw-r--r-- | src/test/ui/methods/method-call-lifetime-args-unresolved.stderr | 17 |
2 files changed, 20 insertions, 2 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..ba7231070a0 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,6 @@ fn main() { - 0.clone::<'a>(); //~ ERROR use of undeclared lifetime name `'a` + 0.clone::<'a>(); + //~^ ERROR use of undeclared lifetime name `'a` + //~| WARN cannot specify lifetime arguments explicitly if late bound + //~| WARN this was previously accepted by the compiler } 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 c9f235c4f7d..78af19586a1 100644 --- a/src/test/ui/methods/method-call-lifetime-args-unresolved.stderr +++ b/src/test/ui/methods/method-call-lifetime-args-unresolved.stderr @@ -6,6 +6,21 @@ LL | fn main() { LL | 0.clone::<'a>(); | ^^ undeclared lifetime -error: aborting due to previous error +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: aborting due to previous error; 1 warning emitted For more information about this error, try `rustc --explain E0261`. |
