@@ -12,6 +12,13 @@ LL | x as _
12
12
= note: requirement occurs because of a mutable pointer to `dyn Trait<'_>`
13
13
= note: mutable pointers are invariant over their type parameter
14
14
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
15
+ note: raw pointer casts of trait objects do not cast away lifetimes
16
+ --> $DIR/ptr-to-trait-obj-different-regions-misc.rs:7:5
17
+ |
18
+ LL | x as _
19
+ | ^^^^^^
20
+ = note: this was previously accepted by the compiler but was changed recently
21
+ = help: see <https://github.com/rust-lang/rust/issues/141402> for more information
15
22
16
23
error: lifetime may not live long enough
17
24
--> $DIR/ptr-to-trait-obj-different-regions-misc.rs:7:5
@@ -27,6 +34,13 @@ LL | x as _
27
34
= note: requirement occurs because of a mutable pointer to `dyn Trait<'_>`
28
35
= note: mutable pointers are invariant over their type parameter
29
36
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
37
+ note: raw pointer casts of trait objects do not cast away lifetimes
38
+ --> $DIR/ptr-to-trait-obj-different-regions-misc.rs:7:5
39
+ |
40
+ LL | x as _
41
+ | ^^^^^^
42
+ = note: this was previously accepted by the compiler but was changed recently
43
+ = help: see <https://github.com/rust-lang/rust/issues/141402> for more information
30
44
31
45
help: `'b` and `'a` must be the same: replace one with the other
32
46
@@ -44,6 +58,13 @@ LL | x as _
44
58
= note: requirement occurs because of a mutable pointer to `dyn Trait<'_>`
45
59
= note: mutable pointers are invariant over their type parameter
46
60
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
61
+ note: raw pointer casts of trait objects do not cast away lifetimes
62
+ --> $DIR/ptr-to-trait-obj-different-regions-misc.rs:12:5
63
+ |
64
+ LL | x as _
65
+ | ^^^^^^
66
+ = note: this was previously accepted by the compiler but was changed recently
67
+ = help: see <https://github.com/rust-lang/rust/issues/141402> for more information
47
68
48
69
error: lifetime may not live long enough
49
70
--> $DIR/ptr-to-trait-obj-different-regions-misc.rs:16:5
@@ -59,6 +80,13 @@ LL | x as _
59
80
= note: requirement occurs because of a mutable pointer to `dyn Trait<'_>`
60
81
= note: mutable pointers are invariant over their type parameter
61
82
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
83
+ note: raw pointer casts of trait objects do not cast away lifetimes
84
+ --> $DIR/ptr-to-trait-obj-different-regions-misc.rs:16:5
85
+ |
86
+ LL | x as _
87
+ | ^^^^^^
88
+ = note: this was previously accepted by the compiler but was changed recently
89
+ = help: see <https://github.com/rust-lang/rust/issues/141402> for more information
62
90
63
91
error: lifetime may not live long enough
64
92
--> $DIR/ptr-to-trait-obj-different-regions-misc.rs:20:5
@@ -97,6 +125,13 @@ LL | x as _
97
125
= note: requirement occurs because of a mutable pointer to `dyn Assocked<Assoc = dyn Send>`
98
126
= note: mutable pointers are invariant over their type parameter
99
127
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
128
+ note: raw pointer casts of trait objects do not cast away lifetimes
129
+ --> $DIR/ptr-to-trait-obj-different-regions-misc.rs:32:5
130
+ |
131
+ LL | x as _
132
+ | ^^^^^^
133
+ = note: this was previously accepted by the compiler but was changed recently
134
+ = help: see <https://github.com/rust-lang/rust/issues/141402> for more information
100
135
101
136
error: lifetime may not live long enough
102
137
--> $DIR/ptr-to-trait-obj-different-regions-misc.rs:32:5
@@ -113,6 +148,13 @@ LL | x as _
113
148
= note: requirement occurs because of a mutable pointer to `dyn Assocked<Assoc = dyn Send>`
114
149
= note: mutable pointers are invariant over their type parameter
115
150
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
151
+ note: raw pointer casts of trait objects do not cast away lifetimes
152
+ --> $DIR/ptr-to-trait-obj-different-regions-misc.rs:32:5
153
+ |
154
+ LL | x as _
155
+ | ^^^^^^
156
+ = note: this was previously accepted by the compiler but was changed recently
157
+ = help: see <https://github.com/rust-lang/rust/issues/141402> for more information
116
158
117
159
help: `'b` and `'a` must be the same: replace one with the other
118
160
|
@@ -133,6 +175,13 @@ LL | x as _
133
175
= note: requirement occurs because of a mutable pointer to `dyn Assocked<Assoc = dyn Trait<'_>>`
134
176
= note: mutable pointers are invariant over their type parameter
135
177
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
178
+ note: raw pointer casts of trait objects do not cast away lifetimes
179
+ --> $DIR/ptr-to-trait-obj-different-regions-misc.rs:39:5
180
+ |
181
+ LL | x as _
182
+ | ^^^^^^
183
+ = note: this was previously accepted by the compiler but was changed recently
184
+ = help: see <https://github.com/rust-lang/rust/issues/141402> for more information
136
185
137
186
error: lifetime may not live long enough
138
187
--> $DIR/ptr-to-trait-obj-different-regions-misc.rs:39:5
@@ -149,6 +198,13 @@ LL | x as _
149
198
= note: requirement occurs because of a mutable pointer to `dyn Assocked<Assoc = dyn Trait<'_>>`
150
199
= note: mutable pointers are invariant over their type parameter
151
200
= help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
201
+ note: raw pointer casts of trait objects do not cast away lifetimes
202
+ --> $DIR/ptr-to-trait-obj-different-regions-misc.rs:39:5
203
+ |
204
+ LL | x as _
205
+ | ^^^^^^
206
+ = note: this was previously accepted by the compiler but was changed recently
207
+ = help: see <https://github.com/rust-lang/rust/issues/141402> for more information
152
208
153
209
help: `'b` and `'a` must be the same: replace one with the other
154
210
|
@@ -168,6 +224,14 @@ LL | require_static(ptr as _)
168
224
| |
169
225
| `ptr` escapes the function body here
170
226
| argument requires that `'a` must outlive `'static`
227
+ |
228
+ note: raw pointer casts of trait objects do not cast away lifetimes
229
+ --> $DIR/ptr-to-trait-obj-different-regions-misc.rs:46:20
230
+ |
231
+ LL | require_static(ptr as _)
232
+ | ^^^^^^^^
233
+ = note: this was previously accepted by the compiler but was changed recently
234
+ = help: see <https://github.com/rust-lang/rust/issues/141402> for more information
171
235
172
236
error: aborting due to 11 previous errors
173
237
0 commit comments