You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/ui/cast/ptr-to-trait-obj-add-auto.stderr
+17-5Lines changed: 17 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,23 @@
1
-
error[E0277]: the trait bound `dyn Trait<'_>: Unsize<dyn Trait<'_> + Send>` is not satisfied
1
+
warning: adding an auto trait `Send` to a trait object in a pointer cast may cause UB later on
2
2
--> $DIR/ptr-to-trait-obj-add-auto.rs:6:5
3
3
|
4
4
LL | x as _
5
-
| ^^^^^^ the trait `Unsize<dyn Trait<'_> + Send>` is not implemented for `dyn Trait<'_>`
5
+
| ^^^^^^
6
6
|
7
-
= note: all implementations of `Unsize` are provided automatically by the compiler, see <https://doc.rust-lang.org/stable/std/marker/trait.Unsize.html> for more information
7
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8
+
= note: for more information, see issue #125289 <https://github.com/rust-lang/rust/issues/125289>
9
+
= note: `#[warn(ptr_cast_add_auto_to_object)]` on by default
0 commit comments