fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
604 B16 linesraw
1error[E0521]: borrowed data escapes outside of function
2  --> $DIR/dyn-trait.rs:24:5
3   |
4LL | fn with_dyn_debug_static<'a>(x: Box<dyn Debug + 'a>) {
5   |                          --  - `x` is a reference that is only valid in the function body
6   |                          |
7   |                          lifetime `'a` defined here
8LL |     static_val(x);
9   |     ^^^^^^^^^^^^^
10   |     |
11   |     `x` escapes the function body here
12   |     argument requires that `'a` must outlive `'static`
13
14error: aborting due to previous error
15
16For more information about this error, try `rustc --explain E0521`.