]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issues/issue-72312.stderr
Merge commit '7b73b60faca71d01d900e49831fcb84553e93019' into sync-rustfmt
[rust.git] / src / test / ui / async-await / issues / issue-72312.stderr
1 error[E0521]: borrowed data escapes outside of associated function
2   --> $DIR/issue-72312.rs:12:9
3    |
4 LL |       pub async fn start(&self) {
5    |                          -----
6    |                          |
7    |                          `self` is a reference that is only valid in the associated function body
8    |                          let's call the lifetime of this reference `'1`
9 ...
10 LL | /         require_static(async move {
11 LL | |
12 LL | |
13 LL | |
14 LL | |             &self;
15 LL | |         });
16    | |          ^
17    | |          |
18    | |__________`self` escapes the associated function body here
19    |            argument requires that `'1` must outlive `'static`
20
21 error: aborting due to previous error
22
23 For more information about this error, try `rustc --explain E0521`.