2018-07-26 00:21:35 -05:00
|
|
|
warning: not reporting region error due to nll
|
|
|
|
--> $DIR/mir_check_cast_reify.rs:46:25
|
|
|
|
|
|
|
|
|
LL | let f: fn(_) -> _ = foo;
|
|
|
|
| ^^^
|
|
|
|
|
2018-07-24 09:22:41 -05:00
|
|
|
error: borrowed data escapes outside of function
|
2018-07-26 00:21:35 -05:00
|
|
|
--> $DIR/mir_check_cast_reify.rs:48:5
|
|
|
|
|
|
|
|
|
LL | fn bar<'a>(x: &'a u32) -> &'static u32 {
|
2018-07-24 09:22:41 -05:00
|
|
|
| - `x` is a reference that is only valid in the function body
|
2018-07-26 00:21:35 -05:00
|
|
|
...
|
|
|
|
LL | f(x)
|
2018-07-24 09:22:41 -05:00
|
|
|
| ^^^^ `x` escapes the function body here
|
2018-07-26 00:21:35 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|