@@ -6,24 +6,24 @@ LL | fn compare_const<'a, 'b>(x: *const &mut &'a i32, y: *const &mut &'b i32) {
6
6
| |
7
7
| lifetime `'a` defined here
8
8
LL | x == y;
9
- | ^ requires that `'b ` must outlive `'a `
9
+ | ^^^^^^ argument requires that `'a ` must outlive `'b `
10
10
|
11
- = help: consider adding the following bound: `'b : 'a `
11
+ = help: consider adding the following bound: `'a : 'b `
12
12
= note: requirement occurs because of a mutable reference to `&i32`
13
13
= note: mutable references are invariant over their type parameter
14
14
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
15
15
16
16
error: lifetime may not live long enough
17
- --> $DIR/type-check-pointer-comparisons.rs:4:10
17
+ --> $DIR/type-check-pointer-comparisons.rs:4:5
18
18
|
19
19
LL | fn compare_const<'a, 'b>(x: *const &mut &'a i32, y: *const &mut &'b i32) {
20
20
| -- -- lifetime `'b` defined here
21
21
| |
22
22
| lifetime `'a` defined here
23
23
LL | x == y;
24
- | ^ requires that `'a ` must outlive `'b `
24
+ | ^^^^^^ argument requires that `'b ` must outlive `'a `
25
25
|
26
- = help: consider adding the following bound: `'a : 'b `
26
+ = help: consider adding the following bound: `'b : 'a `
27
27
= note: requirement occurs because of a mutable reference to `&i32`
28
28
= note: mutable references are invariant over their type parameter
29
29
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
@@ -38,24 +38,24 @@ LL | fn compare_mut<'a, 'b>(x: *mut &'a i32, y: *mut &'b i32) {
38
38
| |
39
39
| lifetime `'a` defined here
40
40
LL | x == y;
41
- | ^ requires that `'b ` must outlive `'a `
41
+ | ^^^^^^ argument requires that `'a ` must outlive `'b `
42
42
|
43
- = help: consider adding the following bound: `'b : 'a `
43
+ = help: consider adding the following bound: `'a : 'b `
44
44
= note: requirement occurs because of a mutable pointer to `&i32`
45
45
= note: mutable pointers are invariant over their type parameter
46
46
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
47
47
48
48
error: lifetime may not live long enough
49
- --> $DIR/type-check-pointer-comparisons.rs:10:10
49
+ --> $DIR/type-check-pointer-comparisons.rs:10:5
50
50
|
51
51
LL | fn compare_mut<'a, 'b>(x: *mut &'a i32, y: *mut &'b i32) {
52
52
| -- -- lifetime `'b` defined here
53
53
| |
54
54
| lifetime `'a` defined here
55
55
LL | x == y;
56
- | ^ requires that `'a ` must outlive `'b `
56
+ | ^^^^^^ argument requires that `'b ` must outlive `'a `
57
57
|
58
- = help: consider adding the following bound: `'a : 'b `
58
+ = help: consider adding the following bound: `'b : 'a `
59
59
= note: requirement occurs because of a mutable pointer to `&i32`
60
60
= note: mutable pointers are invariant over their type parameter
61
61
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
@@ -72,24 +72,24 @@ LL | fn compare_fn_ptr<'a, 'b, 'c>(f: fn(&'c mut &'a i32), g: fn(&'c mut &'b i32
72
72
| |
73
73
| lifetime `'a` defined here
74
74
LL | f == g;
75
- | ^ requires that `'b ` must outlive `'a `
75
+ | ^^^^^^ argument requires that `'a ` must outlive `'b `
76
76
|
77
- = help: consider adding the following bound: `'b : 'a `
77
+ = help: consider adding the following bound: `'a : 'b `
78
78
= note: requirement occurs because of a mutable reference to `&i32`
79
79
= note: mutable references are invariant over their type parameter
80
80
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
81
81
82
82
error: lifetime may not live long enough
83
- --> $DIR/type-check-pointer-comparisons.rs:16:10
83
+ --> $DIR/type-check-pointer-comparisons.rs:16:5
84
84
|
85
85
LL | fn compare_fn_ptr<'a, 'b, 'c>(f: fn(&'c mut &'a i32), g: fn(&'c mut &'b i32)) {
86
86
| -- -- lifetime `'b` defined here
87
87
| |
88
88
| lifetime `'a` defined here
89
89
LL | f == g;
90
- | ^ requires that `'a ` must outlive `'b `
90
+ | ^^^^^^ argument requires that `'b ` must outlive `'a `
91
91
|
92
- = help: consider adding the following bound: `'a : 'b `
92
+ = help: consider adding the following bound: `'b : 'a `
93
93
= note: requirement occurs because of a mutable reference to `&i32`
94
94
= note: mutable references are invariant over their type parameter
95
95
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
0 commit comments