]> git.proxmox.com Git - rustc.git/blame - src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / lifetimes / lifetime-bound-will-change-warning.stderr
CommitLineData
b7449926 1error[E0308]: mismatched types
0731742a 2 --> $DIR/lifetime-bound-will-change-warning.rs:34:13
b7449926 3 |
532ac7d7 4LL | 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 9note: 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 12LL | fn test2<'a>(x: &'a Box<dyn Fn() + 'a>) {
b7449926
XL
13 | ^^
14 = note: ...does not necessarily outlive the static lifetime
15
16error[E0308]: mismatched types
0731742a 17 --> $DIR/lifetime-bound-will-change-warning.rs:39:18
b7449926 18 |
532ac7d7 19LL | 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 24note: 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 27LL | fn test2cc<'a>(x: &'a Box<dyn Fn() + 'a>) {
b7449926
XL
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`.