2021-10-12 08:16:36 -05:00
|
|
|
error[E0521]: borrowed data escapes outside of associated function
|
2022-10-27 11:15:11 -05:00
|
|
|
--> $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
|
|
|
...
|
2022-10-27 11:15:11 -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 | | });
|
2022-10-27 11:15:11 -05:00
|
|
|
| | ^
|
|
|
|
| | |
|
|
|
|
| |__________`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`.
|