]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.stderr
fix updated stderr outputs
[rust.git] / src / test / ui / suggestions / lifetimes / missing-lifetimes-in-signature-2.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 | /     foo.bar(move |_| {
5 LL | |
6 LL | |         t.test();
7 LL | |     });
8    | |______^
9    |
10 note: the parameter type `T` must be valid for the anonymous lifetime defined here...
11   --> $DIR/missing-lifetimes-in-signature-2.rs:19:24
12    |
13 LL | fn func<T: Test>(foo: &Foo, t: T) {
14    |                        ^^^
15 note: ...so that the type `T` will meet its required lifetime bounds
16   --> $DIR/missing-lifetimes-in-signature-2.rs:20:5
17    |
18 LL | /     foo.bar(move |_| {
19 LL | |
20 LL | |         t.test();
21 LL | |     });
22    | |______^
23 help: consider adding an explicit lifetime bound...
24    |
25 LL | fn func<T: Test + 'a>(foo: &Foo, t: T) {
26    |                 ++++
27
28 error: aborting due to previous error
29
30 For more information about this error, try `rustc --explain E0311`.