1 error: borrowed data escapes outside of function
2 --> $DIR/lifetime-bound-will-change-warning.rs:44:5
4 LL | fn test2<'a>(x: &'a Box<Fn()+'a>) {
5 | - `x` is a reference that is only valid in the function body
6 LL | // but ref_obj will not, so warn.
7 LL | ref_obj(x) //~ ERROR mismatched types
8 | ^^^^^^^^^^ `x` escapes the function body here
10 error: borrowed data escapes outside of function
11 --> $DIR/lifetime-bound-will-change-warning.rs:49:5
13 LL | fn test2cc<'a>(x: &'a Box<Fn()+'a>) {
14 | - `x` is a reference that is only valid in the function body
15 LL | // same as test2, but cross crate
16 LL | lib::ref_obj(x) //~ ERROR mismatched types
17 | ^^^^^^^^^^^^^^^ `x` escapes the function body here
19 error: aborting due to 2 previous errors