From fcce998d564678d7736f8382861f0fbb5e549dd2 Mon Sep 17 00:00:00 2001 From: 0yoyoyo <60439919+0yoyoyo@users.noreply.github.com> Date: Fri, 12 Feb 2021 21:51:00 +0900 Subject: [PATCH] Add nll test --- .../missing-lifetimes-in-signature-2.nll.stderr | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.nll.stderr diff --git a/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.nll.stderr b/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.nll.stderr new file mode 100644 index 00000000000..b359826cb4a --- /dev/null +++ b/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.nll.stderr @@ -0,0 +1,17 @@ +error[E0311]: the parameter type `T` may not live long enough + --> $DIR/missing-lifetimes-in-signature-2.rs:20:5 + | +LL | / foo.bar(move |_| { +LL | | +LL | | t.test(); +LL | | }); + | |______^ + | +note: the parameter type `T` must be valid for the anonymous lifetime #2 defined on the function body at 19:1... + --> $DIR/missing-lifetimes-in-signature-2.rs:19:1 + | +LL | fn func(foo: &Foo, t: T) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error +