]> git.proxmox.com Git - rustc.git/blob - src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr
91cdc0205d8411719888ccc394f6f210b9150fd6
[rustc.git] / src / test / ui / lifetimes / lifetime-bound-will-change-warning.stderr
1 error[E0308]: mismatched types
2 --> $DIR/lifetime-bound-will-change-warning.rs:34:13
3 |
4 LL | ref_obj(x)
5 | ^ lifetime mismatch
6 |
7 = note: expected reference `&Box<(dyn Fn() + 'static)>`
8 found reference `&Box<(dyn Fn() + 'a)>`
9 note: the lifetime `'a` as defined on the function body at 32:10...
10 --> $DIR/lifetime-bound-will-change-warning.rs:32:10
11 |
12 LL | fn test2<'a>(x: &'a Box<dyn Fn() + 'a>) {
13 | ^^
14 = note: ...does not necessarily outlive the static lifetime
15
16 error[E0308]: mismatched types
17 --> $DIR/lifetime-bound-will-change-warning.rs:39:18
18 |
19 LL | lib::ref_obj(x)
20 | ^ lifetime mismatch
21 |
22 = note: expected reference `&Box<(dyn Fn() + 'static)>`
23 found reference `&Box<(dyn Fn() + 'a)>`
24 note: the lifetime `'a` as defined on the function body at 37:12...
25 --> $DIR/lifetime-bound-will-change-warning.rs:37:12
26 |
27 LL | fn test2cc<'a>(x: &'a Box<dyn Fn() + 'a>) {
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`.