]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-95272.stderr
Auto merge of #105121 - oli-obk:simpler-cheaper-dump_mir, r=nnethercote
[rust.git] / src / test / ui / nll / issue-95272.stderr
1 error: lifetime may not live long enough
2   --> $DIR/issue-95272.rs:10:13
3    |
4 LL | fn test<'a, 'b>(x: Cell<&'a ()>, y: Cell<&'b ()>) {
5    |         --  -- lifetime `'b` defined here
6    |         |
7    |         lifetime `'a` defined here
8 LL |     let f = check;
9    |             ^^^^^ assignment requires that `'a` must outlive `'b`
10    |
11    = help: consider adding the following bound: `'a: 'b`
12    = note: requirement occurs because of a function pointer to `check`
13    = note: the function `check` is invariant over the parameter `'a`
14    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
15
16 error: aborting due to previous error
17