diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-08-06 16:41:35 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2018-08-27 17:48:52 -0400 |
| commit | f77ad5c6e56689bde62f631d75757242a52e5eaf (patch) | |
| tree | 3bfbcba392889849f1aef724f81222c26643ef36 | |
| parent | 70a21e89f136c91f676959c126666d13a2deeadf (diff) | |
| download | rust-f77ad5c6e56689bde62f631d75757242a52e5eaf.tar.gz rust-f77ad5c6e56689bde62f631d75757242a52e5eaf.zip | |
remove `let x = baz` which was obscuring the real error
| -rw-r--r-- | src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.nll.stderr | 15 | ||||
| -rw-r--r-- | src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.rs | 1 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.nll.stderr index c5f3510fa0e..b4cbed03153 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.nll.stderr @@ -4,14 +4,15 @@ warning: not reporting region error due to nll LL | x.push(y); //~ ERROR explicit lifetime required | ^ -error[E0282]: type annotations needed - --> $DIR/ex2a-push-one-existing-name-early-bound.rs:20:9 +error[E0621]: explicit lifetime required in the type of `y` + --> $DIR/ex2a-push-one-existing-name-early-bound.rs:17:5 | -LL | let x = baz; - | - ^^^ cannot infer type for `T` - | | - | consider giving `x` a type +LL | fn baz<'a, 'b, T>(x: &mut Vec<&'a T>, y: &T) + | -- help: add explicit lifetime `'a` to the type of `y`: `&'a T` +... +LL | x.push(y); //~ ERROR explicit lifetime required + | ^^^^^^^^^ lifetime `'a` required error: aborting due to previous error -For more information about this error, try `rustc --explain E0282`. +For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.rs b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.rs index 18a720f345d..cad0a3c6ac1 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.rs +++ b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.rs @@ -17,5 +17,4 @@ fn baz<'a, 'b, T>(x: &mut Vec<&'a T>, y: &T) x.push(y); //~ ERROR explicit lifetime required } fn main() { -let x = baz; } |
