2021-02-12 06:51:00 -06:00
|
|
|
error[E0311]: the parameter type `T` may not live long enough
|
2022-12-26 17:43:31 -06:00
|
|
|
--> $DIR/missing-lifetimes-in-signature-2.rs:23:5
|
2021-02-12 06:51:00 -06:00
|
|
|
|
|
|
|
|
LL | / foo.bar(move |_| {
|
|
|
|
LL | |
|
|
|
|
LL | | t.test();
|
|
|
|
LL | | });
|
|
|
|
| |______^
|
|
|
|
|
|
2021-10-05 07:11:51 -05:00
|
|
|
note: the parameter type `T` must be valid for the anonymous lifetime defined here...
|
2022-12-26 17:43:31 -06:00
|
|
|
--> $DIR/missing-lifetimes-in-signature-2.rs:22:24
|
2021-02-12 06:51:00 -06:00
|
|
|
|
|
|
|
|
LL | fn func<T: Test>(foo: &Foo, t: T) {
|
2021-02-21 03:38:20 -06:00
|
|
|
| ^^^
|
2022-04-24 10:04:31 -05:00
|
|
|
note: ...so that the type `T` will meet its required lifetime bounds
|
2022-12-26 17:43:31 -06:00
|
|
|
--> $DIR/missing-lifetimes-in-signature-2.rs:23:5
|
2022-04-24 10:04:31 -05:00
|
|
|
|
|
|
|
|
LL | / foo.bar(move |_| {
|
|
|
|
LL | |
|
|
|
|
LL | | t.test();
|
|
|
|
LL | | });
|
|
|
|
| |______^
|
2022-04-30 03:33:37 -05:00
|
|
|
help: consider adding an explicit lifetime bound...
|
|
|
|
|
|
2022-12-26 17:43:31 -06:00
|
|
|
LL | fn func<'a, T: Test + 'a>(foo: &'a Foo<'a>, t: T) {
|
|
|
|
| +++ ++++ ++ ++++
|
2021-02-12 06:51:00 -06:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2022-08-19 06:06:47 -05:00
|
|
|
For more information about this error, try `rustc --explain E0311`.
|