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