]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/in-trait/async-lifetimes-and-bounds.stderr
Merge commit 'd822110d3b5625b9dc80ccc442e06fc3cc851d76' into clippyup
[rust.git] / src / test / ui / async-await / in-trait / async-lifetimes-and-bounds.stderr
1 error[E0309]: the parameter type `Self` may not live long enough
2   --> $DIR/async-lifetimes-and-bounds.rs:11:43
3    |
4 LL |     async fn foo(&'a self, key: &'b T) -> (&'a Self, &'b T) where T: Debug + Sized;
5    |                                           ^^^^^^^^^^^^^^^^^
6    |
7    = help: consider adding an explicit lifetime bound `Self: 'a`...
8    = note: ...so that the reference type `&'a Self` does not outlive the data it points at
9
10 error[E0309]: the parameter type `T` may not live long enough
11   --> $DIR/async-lifetimes-and-bounds.rs:11:43
12    |
13 LL |     async fn foo(&'a self, key: &'b T) -> (&'a Self, &'b T) where T: Debug + Sized;
14    |                                           ^^^^^^^^^^^^^^^^^ ...so that the reference type `&'b T` does not outlive the data it points at
15    |
16 help: consider adding an explicit lifetime bound...
17    |
18 LL | trait MyTrait<'a, 'b, T: 'b> {
19    |                        ++++
20
21 error: aborting due to 2 previous errors
22
23 For more information about this error, try `rustc --explain E0309`.