18 lines
482 B
Plaintext
18 lines
482 B
Plaintext
|
warning: not reporting region error due to nll
|
||
|
--> $DIR/mir_check_cast_reify.rs:46:25
|
||
|
|
|
||
|
LL | let f: fn(_) -> _ = foo;
|
||
|
| ^^^
|
||
|
|
||
|
error: borrowed data escapes outside of closure
|
||
|
--> $DIR/mir_check_cast_reify.rs:48:5
|
||
|
|
|
||
|
LL | fn bar<'a>(x: &'a u32) -> &'static u32 {
|
||
|
| - `x` is a reference that is only valid in the closure body
|
||
|
...
|
||
|
LL | f(x)
|
||
|
| ^^^^ `x` escapes the closure body here
|
||
|
|
||
|
error: aborting due to previous error
|
||
|
|