mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
41e8d152dc
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
15 lines
642 B
Plaintext
15 lines
642 B
Plaintext
error[E0310]: the associated type `<Self as MyTrait>::{opaque#0}` may not live long enough
|
|
--> $DIR/async-and-ret-ref.rs:7:5
|
|
|
|
|
LL | async fn foo() -> &'static impl T;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| the associated type `<Self as MyTrait>::{opaque#0}` must be valid for the static lifetime...
|
|
| ...so that the reference type `&'static impl T` does not outlive the data it points at
|
|
|
|
|
= help: consider adding an explicit lifetime bound `<Self as MyTrait>::{opaque#0}: 'static`...
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0310`.
|