rust/tests/ui/async-await/issues/issue-72312.stderr

24 lines
740 B
Plaintext
Raw Normal View History

error[E0521]: borrowed data escapes outside of method
--> $DIR/issue-72312.rs:12:9
2021-10-12 08:16:36 -05:00
|
LL | pub async fn start(&self) {
2021-10-12 08:28:02 -05:00
| -----
| |
| `self` is a reference that is only valid in the method body
2021-10-12 08:28:02 -05:00
| let's call the lifetime of this reference `'1`
2021-10-12 08:16:36 -05:00
...
LL | / require_static(async move {
2022-05-21 14:46:25 -05:00
LL | |
LL | |
LL | |
2021-10-12 08:16:36 -05:00
LL | | &self;
LL | | });
| | ^
| | |
| |__________`self` escapes the method body here
| argument requires that `'1` must outlive `'static`
2021-10-12 08:16:36 -05:00
error: aborting due to previous error
For more information about this error, try `rustc --explain E0521`.