]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/type-check-pointer-comparisons.stderr
Rollup merge of #83807 - sjakobi:77548-remove-ignore-annotations, r=Mark-Simulacrum
[rust.git] / src / test / ui / nll / type-check-pointer-comparisons.stderr
1 error: lifetime may not live long enough
2   --> $DIR/type-check-pointer-comparisons.rs:6:5
3    |
4 LL | fn compare_const<'a, 'b>(x: *const &mut &'a i32, y: *const &mut &'b i32) {
5    |                  --  -- lifetime `'b` defined here
6    |                  |
7    |                  lifetime `'a` defined here
8 LL |     x == y;
9    |     ^ requires that `'a` must outlive `'b`
10    |
11    = help: consider adding the following bound: `'a: 'b`
12
13 error: lifetime may not live long enough
14   --> $DIR/type-check-pointer-comparisons.rs:6:10
15    |
16 LL | fn compare_const<'a, 'b>(x: *const &mut &'a i32, y: *const &mut &'b i32) {
17    |                  --  -- lifetime `'b` defined here
18    |                  |
19    |                  lifetime `'a` defined here
20 LL |     x == y;
21    |          ^ requires that `'b` must outlive `'a`
22    |
23    = help: consider adding the following bound: `'b: 'a`
24
25 help: `'a` and `'b` must be the same: replace one with the other
26
27 error: lifetime may not live long enough
28   --> $DIR/type-check-pointer-comparisons.rs:12:5
29    |
30 LL | fn compare_mut<'a, 'b>(x: *mut &'a i32, y: *mut &'b i32) {
31    |                --  -- lifetime `'b` defined here
32    |                |
33    |                lifetime `'a` defined here
34 LL |     x == y;
35    |     ^ requires that `'a` must outlive `'b`
36    |
37    = help: consider adding the following bound: `'a: 'b`
38
39 error: lifetime may not live long enough
40   --> $DIR/type-check-pointer-comparisons.rs:12:10
41    |
42 LL | fn compare_mut<'a, 'b>(x: *mut &'a i32, y: *mut &'b i32) {
43    |                --  -- lifetime `'b` defined here
44    |                |
45    |                lifetime `'a` defined here
46 LL |     x == y;
47    |          ^ requires that `'b` must outlive `'a`
48    |
49    = help: consider adding the following bound: `'b: 'a`
50
51 help: `'a` and `'b` must be the same: replace one with the other
52
53 error: lifetime may not live long enough
54   --> $DIR/type-check-pointer-comparisons.rs:18:5
55    |
56 LL | fn compare_fn_ptr<'a, 'b, 'c>(f: fn(&'c mut &'a i32), g: fn(&'c mut &'b i32)) {
57    |                   --  -- lifetime `'b` defined here
58    |                   |
59    |                   lifetime `'a` defined here
60 LL |     f == g;
61    |     ^ requires that `'a` must outlive `'b`
62    |
63    = help: consider adding the following bound: `'a: 'b`
64
65 error: lifetime may not live long enough
66   --> $DIR/type-check-pointer-comparisons.rs:18:10
67    |
68 LL | fn compare_fn_ptr<'a, 'b, 'c>(f: fn(&'c mut &'a i32), g: fn(&'c mut &'b i32)) {
69    |                   --  -- lifetime `'b` defined here
70    |                   |
71    |                   lifetime `'a` defined here
72 LL |     f == g;
73    |          ^ requires that `'b` must outlive `'a`
74    |
75    = help: consider adding the following bound: `'b: 'a`
76
77 help: `'a` and `'b` must be the same: replace one with the other
78
79 error: aborting due to 6 previous errors
80