1 error[E0521]: borrowed data escapes outside of function
2 --> $DIR/lifetime-bound-will-change-warning.rs:34:5
4 LL | fn test2<'a>(x: &'a Box<dyn Fn() + 'a>) {
5 | - `x` is a reference that is only valid in the function body
6 LL | // but ref_obj will not, so warn.
8 | ^^^^^^^^^^ `x` escapes the function body here
10 = help: consider replacing `'a` with `'static`
12 error[E0521]: borrowed data escapes outside of function
13 --> $DIR/lifetime-bound-will-change-warning.rs:39:5
15 LL | fn test2cc<'a>(x: &'a Box<dyn Fn() + 'a>) {
16 | - `x` is a reference that is only valid in the function body
17 LL | // same as test2, but cross crate
19 | ^^^^^^^^^^^^^^^ `x` escapes the function body here
21 = help: consider replacing `'a` with `'static`
23 error: aborting due to 2 previous errors