about summary refs log tree commit diff
path: root/tests/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.stderr
blob: 2677b7943cccabb62a495ffa46c3cb8dc9566494 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
error[E0311]: the parameter type `T` may not live long enough
  --> $DIR/missing-lifetimes-in-signature-2.rs:23:5
   |
LL |   fn func<T: Test>(_dummy: &Foo, foo: &Foo, t: T) {
   |                                        --- the parameter type `T` must be valid for the anonymous lifetime defined here...
LL | /     foo.bar(move |_| {
LL | |
LL | |         t.test();
LL | |     });
   | |______^ ...so that the type `T` will meet its required lifetime bounds
   |
help: consider adding an explicit lifetime bound
   |
LL | fn func<'a, T: Test + 'a>(_dummy: &Foo, foo: &Foo<'a>, t: T) {
   |         +++         ++++                         ++++

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0311`.