about summary refs log tree commit diff
path: root/tests/ui/nll/issue-54779-anon-static-lifetime.stderr
blob: 03a55906614222fb21dd7dc6b9b7e0a89474df7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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`.