]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-header-lifetime-elision/dyn-trait.nll.stderr
Rollup merge of #53110 - Xanewok:save-analysis-remap-path, r=nrc
[rust.git] / src / test / ui / impl-header-lifetime-elision / dyn-trait.nll.stderr
1 warning: not reporting region error due to nll
2   --> $DIR/dyn-trait.rs:32:16
3    |
4 LL |     static_val(x); //~ ERROR cannot infer
5    |                ^
6
7 error: borrowed data escapes outside of function
8   --> $DIR/dyn-trait.rs:32:5
9    |
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
14
15 error: aborting due to previous error
16