]> git.proxmox.com Git - rustc.git/blame - src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr
New upstream version 1.27.1+dfsg1
[rustc.git] / src / test / ui / nll / closure-requirements / propagate-approximated-val.stderr
CommitLineData
83c7162d 1warning: not reporting region error due to nll
ff7c6d11
XL
2 --> $DIR/propagate-approximated-val.rs:50:9
3 |
83c7162d 4LL | demand_y(outlives1, outlives2, x.get()) //~ WARNING not reporting region error due to nll
ff7c6d11
XL
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
7note: External requirements
8 --> $DIR/propagate-approximated-val.rs:46:45
9 |
0531ce1d 10LL | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {
ff7c6d11 11 | _____________________________________________^
0531ce1d
XL
12LL | | //~^ ERROR lifetime mismatch
13LL | |
14LL | | // Only works if 'x: 'y:
83c7162d 15LL | | demand_y(outlives1, outlives2, x.get()) //~ WARNING not reporting region error due to nll
0531ce1d 16LL | | });
ff7c6d11
XL
17 | |_____^
18 |
19 = note: defining type: DefId(0/1:18 ~ propagate_approximated_val[317d]::test[0]::{{closure}}[0]) with closure substs [
20 i16,
21 for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex { depth: 1 }, BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex { depth: 1 }, BrNamed(crate0:DefIndex(0:0), 's)) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex { depth: 1 }, BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex { depth: 1 }, BrNamed(crate0:DefIndex(0:0), 's)) u32>))
22 ]
23 = note: number of external vids: 3
24 = note: where '_#1r: '_#2r
25
26error[E0623]: lifetime mismatch
27 --> $DIR/propagate-approximated-val.rs:46:29
28 |
0531ce1d 29LL | fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
ff7c6d11
XL
30 | ------- -------
31 | |
32 | these two types are declared with different lifetimes...
0531ce1d 33LL | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {
ff7c6d11
XL
34 | ^^^^^^ ...but data from `cell_a` flows into `cell_b` here
35
36note: No external requirements
37 --> $DIR/propagate-approximated-val.rs:45:1
38 |
0531ce1d
XL
39LL | / fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
40LL | | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {
41LL | | //~^ ERROR lifetime mismatch
42LL | |
ff7c6d11 43... |
0531ce1d
XL
44LL | | });
45LL | | }
ff7c6d11
XL
46 | |_^
47 |
48 = note: defining type: DefId(0/0:6 ~ propagate_approximated_val[317d]::test[0]) with substs []
49
50error: aborting due to previous error
51
0531ce1d 52For more information about this error, try `rustc --explain E0623`.