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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
779 B
Plaintext
Raw Normal View History

2021-10-12 08:16:36 -05:00
error[E0521]: borrowed data escapes outside of associated function
--> $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 associated function body
| 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 associated function 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`.