From 44e9d201c1a5bb7db4fd9e312ea1ad690fc42476 Mon Sep 17 00:00:00 2001 From: Jack Huey Date: Thu, 25 Mar 2021 14:11:03 -0400 Subject: [PATCH] Bless nll test --- .../missing-lifetimes-in-signature.nll.stderr | 87 +------------------ 1 file changed, 3 insertions(+), 84 deletions(-) diff --git a/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature.nll.stderr b/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature.nll.stderr index b509610b89e..916a6c2bf12 100644 --- a/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature.nll.stderr +++ b/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature.nll.stderr @@ -1,92 +1,11 @@ error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/missing-lifetimes-in-signature.rs:37:11 + --> $DIR/missing-lifetimes-in-signature.rs:36:11 | LL | fn baz(g: G, dest: &mut T) -> impl FnOnce() + '_ | - ^^ undeclared lifetime | | | help: consider introducing lifetime `'a` here: `'a,` -error: lifetime may not live long enough - --> $DIR/missing-lifetimes-in-signature.rs:15:37 - | -LL | fn foo(g: G, dest: &mut T) -> impl FnOnce() - | - ^^^^^^^^^^^^^ opaque type requires that `'1` must outlive `'static` - | | - | let's call the lifetime of this reference `'1` - | -help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a bound - | -LL | fn foo(g: G, dest: &mut T) -> impl FnOnce() + '_ - | ^^^^^^^^^^^^^^^^^^ +error: aborting due to previous error -error[E0311]: the parameter type `G` may not live long enough - --> $DIR/missing-lifetimes-in-signature.rs:25:37 - | -LL | fn bar(g: G, dest: &mut T) -> impl FnOnce() + '_ - | ^^^^^^^^^^^^^^^^^^ - | -note: the parameter type `G` must be valid for the anonymous lifetime defined on the function body at 25:26... - --> $DIR/missing-lifetimes-in-signature.rs:25:26 - | -LL | fn bar(g: G, dest: &mut T) -> impl FnOnce() + '_ - | ^^^^^^ - -error[E0311]: the parameter type `G` may not live long enough - --> $DIR/missing-lifetimes-in-signature.rs:47:45 - | -LL | fn qux<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ - | ^^^^^^^^^^^^^^^^^^ - | -note: the parameter type `G` must be valid for the anonymous lifetime defined on the function body at 47:34... - --> $DIR/missing-lifetimes-in-signature.rs:47:34 - | -LL | fn qux<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ - | ^^^^^^ - -error[E0311]: the parameter type `G` may not live long enough - --> $DIR/missing-lifetimes-in-signature.rs:59:58 - | -LL | fn qux<'b, G: Get + 'b, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ { - | ^^^^^^^^^^^^^^^^^^ - | -note: the parameter type `G` must be valid for the anonymous lifetime defined on the method body at 59:47... - --> $DIR/missing-lifetimes-in-signature.rs:59:47 - | -LL | fn qux<'b, G: Get + 'b, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ { - | ^^^^^^ - -error[E0311]: the parameter type `G` may not live long enough - --> $DIR/missing-lifetimes-in-signature.rs:68:45 - | -LL | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a - | ^^^^^^^^^^^^^^^^^^^^^^^ - | -note: the parameter type `G` must be valid for the anonymous lifetime defined on the function body at 68:34... - --> $DIR/missing-lifetimes-in-signature.rs:68:34 - | -LL | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a - | ^^^^^^ - -error[E0621]: explicit lifetime required in the type of `dest` - --> $DIR/missing-lifetimes-in-signature.rs:73:5 - | -LL | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a - | ------ help: add explicit lifetime `'a` to the type of `dest`: `&'a mut T` -... -LL | / move || { -LL | | *dest = g.get(); -LL | | } - | |_____^ lifetime `'a` required - -error[E0309]: the parameter type `G` may not live long enough - --> $DIR/missing-lifetimes-in-signature.rs:79:44 - | -LL | fn bak<'a, G, T>(g: G, dest: &'a mut T) -> impl FnOnce() + 'a - | ^^^^^^^^^^^^^^^^^^ - | - = help: consider adding an explicit lifetime bound `G: 'a`... - -error: aborting due to 8 previous errors - -Some errors have detailed explanations: E0261, E0309, E0621. -For more information about an error, try `rustc --explain E0261`. +For more information about this error, try `rustc --explain E0261`.