fork/rust
git clone https://git.julia.blue/fork/rust
4fb7144ed15
1.43.0
1error[E0308]: mismatched types 2 --> $DIR/lifetime-bound-will-change-warning.rs:34:13 3 | 4LL | ref_obj(x) 5 | ^ lifetime mismatch 6 | 7 = note: expected reference `&std::boxed::Box<(dyn std::ops::Fn() + 'static)>` 8 found reference `&std::boxed::Box<(dyn std::ops::Fn() + 'a)>` 9note: the lifetime `'a` as defined on the function body at 32:10... 10 --> $DIR/lifetime-bound-will-change-warning.rs:32:10 11 | 12LL | fn test2<'a>(x: &'a Box<dyn Fn() + 'a>) { 13 | ^^ 14 = note: ...does not necessarily outlive the static lifetime 15 16error[E0308]: mismatched types 17 --> $DIR/lifetime-bound-will-change-warning.rs:39:18 18 | 19LL | lib::ref_obj(x) 20 | ^ lifetime mismatch 21 | 22 = note: expected reference `&std::boxed::Box<(dyn std::ops::Fn() + 'static)>` 23 found reference `&std::boxed::Box<(dyn std::ops::Fn() + 'a)>` 24note: the lifetime `'a` as defined on the function body at 37:12... 25 --> $DIR/lifetime-bound-will-change-warning.rs:37:12 26 | 27LL | fn test2cc<'a>(x: &'a Box<dyn Fn() + 'a>) { 28 | ^^ 29 = note: ...does not necessarily outlive the static lifetime 30 31error: aborting due to 2 previous errors 32 33For more information about this error, try `rustc --explain E0308`.