@@ -12,6 +12,13 @@ LL | x as _
1212 = note: requirement occurs because of a mutable pointer to `dyn Trait<'_>`
1313 = note: mutable pointers are invariant over their type parameter
1414 = 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
1522
1623error: lifetime may not live long enough
1724 --> $DIR/ptr-to-trait-obj-different-regions-misc.rs:7:5
@@ -27,6 +34,13 @@ LL | x as _
2734 = note: requirement occurs because of a mutable pointer to `dyn Trait<'_>`
2835 = note: mutable pointers are invariant over their type parameter
2936 = 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
3044
3145help: `'b` and `'a` must be the same: replace one with the other
3246
@@ -44,6 +58,13 @@ LL | x as _
4458 = note: requirement occurs because of a mutable pointer to `dyn Trait<'_>`
4559 = note: mutable pointers are invariant over their type parameter
4660 = 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
4768
4869error: lifetime may not live long enough
4970 --> $DIR/ptr-to-trait-obj-different-regions-misc.rs:16:5
@@ -59,6 +80,13 @@ LL | x as _
5980 = note: requirement occurs because of a mutable pointer to `dyn Trait<'_>`
6081 = note: mutable pointers are invariant over their type parameter
6182 = 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
6290
6391error: lifetime may not live long enough
6492 --> $DIR/ptr-to-trait-obj-different-regions-misc.rs:20:5
@@ -97,6 +125,13 @@ LL | x as _
97125 = note: requirement occurs because of a mutable pointer to `dyn Assocked<Assoc = dyn Send>`
98126 = note: mutable pointers are invariant over their type parameter
99127 = 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
100135
101136error: lifetime may not live long enough
102137 --> $DIR/ptr-to-trait-obj-different-regions-misc.rs:32:5
@@ -113,6 +148,13 @@ LL | x as _
113148 = note: requirement occurs because of a mutable pointer to `dyn Assocked<Assoc = dyn Send>`
114149 = note: mutable pointers are invariant over their type parameter
115150 = 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
116158
117159help: `'b` and `'a` must be the same: replace one with the other
118160 |
@@ -133,6 +175,13 @@ LL | x as _
133175 = note: requirement occurs because of a mutable pointer to `dyn Assocked<Assoc = dyn Trait<'_>>`
134176 = note: mutable pointers are invariant over their type parameter
135177 = 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
136185
137186error: lifetime may not live long enough
138187 --> $DIR/ptr-to-trait-obj-different-regions-misc.rs:39:5
@@ -149,6 +198,13 @@ LL | x as _
149198 = note: requirement occurs because of a mutable pointer to `dyn Assocked<Assoc = dyn Trait<'_>>`
150199 = note: mutable pointers are invariant over their type parameter
151200 = 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
152208
153209help: `'b` and `'a` must be the same: replace one with the other
154210 |
@@ -168,6 +224,14 @@ LL | require_static(ptr as _)
168224 | |
169225 | `ptr` escapes the function body here
170226 | 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
171235
172236error: aborting due to 11 previous errors
173237
0 commit comments