1 warning: not reporting region error due to nll
2 --> $DIR/dyn-trait.rs:32:16
4 LL | static_val(x); //~ ERROR cannot infer
7 error: borrowed data escapes outside of function
8 --> $DIR/dyn-trait.rs:32:5
10 LL | fn with_dyn_debug_static<'a>(x: Box<dyn Debug + 'a>) {
11 | - `x` is a reference that is only valid in the function body
12 LL | static_val(x); //~ ERROR cannot infer
13 | ^^^^^^^^^^^^^ `x` escapes the function body here
15 error: aborting due to previous error