]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.nll.stderr
Bless tests
[rust.git] / src / test / ui / suggestions / lifetimes / missing-lifetimes-in-signature-2.nll.stderr
1 error[E0311]: the parameter type `T` may not live long enough
2   --> $DIR/missing-lifetimes-in-signature-2.rs:20:5
3    |
4 LL |   fn func<T: Test>(foo: &Foo, t: T) {
5    |           -- help: consider adding an explicit lifetime bound...: `T: 'a +`
6 LL | /     foo.bar(move |_| {
7 LL | |
8 LL | |         t.test();
9 LL | |     });
10    | |______^
11    |
12 note: the parameter type `T` must be valid for the anonymous lifetime defined here...
13   --> $DIR/missing-lifetimes-in-signature-2.rs:19:24
14    |
15 LL | fn func<T: Test>(foo: &Foo, t: T) {
16    |                        ^^^
17 note: ...so that the type `T` will meet its required lifetime bounds
18   --> $DIR/missing-lifetimes-in-signature-2.rs:20:5
19    |
20 LL | /     foo.bar(move |_| {
21 LL | |
22 LL | |         t.test();
23 LL | |     });
24    | |______^
25
26 error: aborting due to previous error
27