2018-04-18 15:34:31 +02:00
|
|
|
warning: not reporting region error due to nll
|
2018-04-25 10:38:15 -05:00
|
|
|
--> $DIR/dyn-trait.rs:32:16
|
2018-04-11 00:38:35 +02:00
|
|
|
|
|
|
|
|
LL | static_val(x); //~ ERROR cannot infer
|
|
|
|
| ^
|
|
|
|
|
2018-07-21 15:50:06 +01:00
|
|
|
error: borrowed data escapes outside of closure
|
2018-04-25 10:38:15 -05:00
|
|
|
--> $DIR/dyn-trait.rs:32:5
|
2018-04-11 00:38:35 +02:00
|
|
|
|
|
2018-07-21 15:50:06 +01:00
|
|
|
LL | fn with_dyn_debug_static<'a>(x: Box<dyn Debug + 'a>) {
|
|
|
|
| - `x` is a reference that is only valid in the closure body
|
2018-04-11 00:38:35 +02:00
|
|
|
LL | static_val(x); //~ ERROR cannot infer
|
2018-07-21 15:50:06 +01:00
|
|
|
| ^^^^^^^^^^^^^ `x` escapes the closure body here
|
2018-04-11 00:38:35 +02:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|