]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issues/issue-72312.stderr
Rollup merge of #103432 - jsha:box-is-not-notable, r=GuillaumeGomez
[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:24
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    |  ________________________^
12 LL | |
13 LL | |
14 LL | |
15 LL | |             &self;
16 LL | |         });
17    | |         ^
18    | |         |
19    | |_________`self` escapes the associated function body here
20    |           argument requires that `'1` must outlive `'static`
21
22 error: aborting due to previous error
23
24 For more information about this error, try `rustc --explain E0521`.