diff options
| author | Jack Huey <jack.huey@umassmed.edu> | 2021-03-25 12:15:45 -0400 |
|---|---|---|
| committer | Jack Huey <jack.huey@umassmed.edu> | 2021-03-31 10:16:37 -0400 |
| commit | 0c98dc66fdc1bd5a2ff56bc72c67b03c2d376cd0 (patch) | |
| tree | df4d5159769d5608f5ed745e40968fb6ef2ef5bc /src | |
| parent | 4ff65ec7823d4ec16c4b88e53b5a76f71b27e324 (diff) | |
| download | rust-0c98dc66fdc1bd5a2ff56bc72c67b03c2d376cd0.tar.gz rust-0c98dc66fdc1bd5a2ff56bc72c67b03c2d376cd0.zip | |
Fix tests and AstConv -> dyn AstConv
Diffstat (limited to 'src')
4 files changed, 19 insertions, 20 deletions
diff --git a/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.rs b/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.rs index 3b407871e37..c1c40afdbab 100644 --- a/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.rs +++ b/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.rs @@ -7,7 +7,7 @@ fn foo(x: &u32) { fn foo2(x: &u32) {} fn bar() { - let y: fn(&'test u32) = foo2; + let y: fn(&'test u32) = foo2; //~ ERROR use of undeclared lifetime } fn main() {} diff --git a/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr b/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr index 7ecb6ff0c9d..a43b49041ec 100644 --- a/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr +++ b/src/test/ui/in-band-lifetimes/no_introducing_in_band_in_locals.stderr @@ -6,6 +6,22 @@ LL | fn foo(x: &u32) { LL | let y: &'test u32 = x; | ^^^^^ undeclared lifetime -error: aborting due to previous error +error[E0261]: use of undeclared lifetime name `'test` + --> $DIR/no_introducing_in_band_in_locals.rs:10:16 + | +LL | let y: fn(&'test u32) = foo2; + | ^^^^^ undeclared lifetime + | + = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html +help: consider introducing lifetime `'test` here + | +LL | fn bar<'test>() { + | ^^^^^^^ +help: consider making the type lifetime-generic with a new `'test` lifetime + | +LL | let y: for<'test> fn(&'test u32) = foo2; + | ^^^^^^^^^^ + +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0261`. 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 d7760985ec6..d16ba3df47b 100644 --- a/src/test/ui/methods/method-call-lifetime-args-unresolved.rs +++ b/src/test/ui/methods/method-call-lifetime-args-unresolved.rs @@ -1,5 +1,3 @@ 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 5a958bc4b9c..93c0384fcc2 100644 --- a/src/test/ui/methods/method-call-lifetime-args-unresolved.stderr +++ b/src/test/ui/methods/method-call-lifetime-args-unresolved.stderr @@ -1,18 +1,3 @@ -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 | @@ -23,6 +8,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; 1 warning emitted +error: aborting due to previous error For more information about this error, try `rustc --explain E0261`. |
