mirror of https://github.com/rust-lang/rust.git
18 lines
604 B
Plaintext
18 lines
604 B
Plaintext
error[E0521]: borrowed data escapes outside of method
|
|
--> $DIR/issue-54779-anon-static-lifetime.rs:32:9
|
|
|
|
|
LL | cx: &dyn DebugContext,
|
|
| -- - let's call the lifetime of this reference `'1`
|
|
| |
|
|
| `cx` is a reference that is only valid in the method body
|
|
...
|
|
LL | bar.debug_with(cx);
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| `cx` escapes the method body here
|
|
| argument requires that `'1` must outlive `'static`
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0521`.
|