1- error[E0277]: the trait bound `W<(dyn A + 'static)>: A` is not satisfied
2- --> $DIR/ptr-to-trait-obj-wrap-add-auto.rs:12:5
3- |
4- LL | a as _
5- | ^ the trait `A` is not implemented for `W<(dyn A + 'static)>`
6- |
7- help: this trait has no implementations, consider adding one
8- --> $DIR/ptr-to-trait-obj-wrap-add-auto.rs:6:1
9- |
10- LL | trait A {}
11- | ^^^^^^^
12- = note: required for the cast from `*const W<(dyn A + 'static)>` to `*const dyn A + Send`
13-
14- error[E0277]: `(dyn A + 'static)` cannot be sent between threads safely
15- --> $DIR/ptr-to-trait-obj-wrap-add-auto.rs:12:5
16- |
17- LL | a as _
18- | ^ `(dyn A + 'static)` cannot be sent between threads safely
19- |
20- = help: within `W<(dyn A + 'static)>`, the trait `Send` is not implemented for `(dyn A + 'static)`
21- note: required because it appears within the type `W<(dyn A + 'static)>`
22- --> $DIR/ptr-to-trait-obj-wrap-add-auto.rs:8:8
23- |
24- LL | struct W<T: ?Sized>(T);
25- | ^
26- = note: required for the cast from `*const W<(dyn A + 'static)>` to `*const dyn A + Send`
27-
28- error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at compilation time
1+ error[E0804]: cannot add auto trait `Send` to dyn bound via pointer cast
292 --> $DIR/ptr-to-trait-obj-wrap-add-auto.rs:12:5
303 |
314LL | a as _
32- | ^ doesn't have a size known at compile-time
33- |
34- = help: within `W<(dyn A + 'static)>`, the trait `Sized` is not implemented for `(dyn A + 'static)`
35- note: required because it appears within the type `W<(dyn A + 'static)>`
36- --> $DIR/ptr-to-trait-obj-wrap-add-auto.rs:8:8
37- |
38- LL | struct W<T: ?Sized>(T);
39- | ^
40- = note: required for the cast from `*const W<(dyn A + 'static)>` to `*const dyn A + Send`
41-
42- error[E0277]: the trait bound `W<(dyn A + 'static)>: A` is not satisfied
43- --> $DIR/ptr-to-trait-obj-wrap-add-auto.rs:19:5
44- |
45- LL | a as _
46- | ^ the trait `A` is not implemented for `W<(dyn A + 'static)>`
47- |
48- help: this trait has no implementations, consider adding one
49- --> $DIR/ptr-to-trait-obj-wrap-add-auto.rs:6:1
50- |
51- LL | trait A {}
52- | ^^^^^^^
53- = note: required for the cast from `*const W<W<(dyn A + 'static)>>` to `*const W<dyn A + Send>`
54-
55- error[E0277]: `(dyn A + 'static)` cannot be sent between threads safely
56- --> $DIR/ptr-to-trait-obj-wrap-add-auto.rs:19:5
57- |
58- LL | a as _
59- | ^ `(dyn A + 'static)` cannot be sent between threads safely
60- |
61- = help: within `W<(dyn A + 'static)>`, the trait `Send` is not implemented for `(dyn A + 'static)`
62- note: required because it appears within the type `W<(dyn A + 'static)>`
63- --> $DIR/ptr-to-trait-obj-wrap-add-auto.rs:8:8
5+ | ^^^^^^ unsupported cast
646 |
65- LL | struct W<T: ?Sized>(T);
66- | ^
67- = note: required for the cast from `*const W<W<(dyn A + 'static)>>` to `*const W<dyn A + Send>`
7+ = note: this could allow UB elsewhere
8+ = help: use `transmute` if you're sure this is sound
689
69- error[E0277 ]: the size for values of type `(dyn A + 'static)` cannot be known at compilation time
70- --> $DIR/ptr-to-trait-obj-wrap-add-auto.rs:19 :5
10+ error[E0804 ]: cannot add auto trait `Send` to dyn bound via pointer cast
11+ --> $DIR/ptr-to-trait-obj-wrap-add-auto.rs:17 :5
7112 |
7213LL | a as _
73- | ^ doesn't have a size known at compile-time
74- |
75- = help: within `W<(dyn A + 'static)>`, the trait `Sized` is not implemented for `(dyn A + 'static)`
76- note: required because it appears within the type `W<(dyn A + 'static)>`
77- --> $DIR/ptr-to-trait-obj-wrap-add-auto.rs:8:8
14+ | ^^^^^^ unsupported cast
7815 |
79- LL | struct W<T: ?Sized>(T);
80- | ^
81- = note: required for the cast from `*const W<W<(dyn A + 'static)>>` to `*const W<dyn A + Send>`
16+ = note: this could allow UB elsewhere
17+ = help: use `transmute` if you're sure this is sound
8218
8319error[E0804]: cannot add auto trait `Send` to dyn bound via pointer cast
84- --> $DIR/ptr-to-trait-obj-wrap-add-auto.rs:26 :5
20+ --> $DIR/ptr-to-trait-obj-wrap-add-auto.rs:22 :5
8521 |
8622LL | a as _
8723 | ^^^^^^ unsupported cast
@@ -90,7 +26,7 @@ LL | a as _
9026 = help: use `transmute` if you're sure this is sound
9127
9228error[E0804]: cannot add auto trait `Send` to dyn bound via pointer cast
93- --> $DIR/ptr-to-trait-obj-wrap-add-auto.rs:31 :5
29+ --> $DIR/ptr-to-trait-obj-wrap-add-auto.rs:27 :5
9430 |
9531LL | a as _
9632 | ^^^^^^ unsupported cast
@@ -99,15 +35,14 @@ LL | a as _
9935 = help: use `transmute` if you're sure this is sound
10036
10137error[E0804]: cannot add auto trait `Send` to dyn bound via pointer cast
102- --> $DIR/ptr-to-trait-obj-wrap-add-auto.rs:36 :5
38+ --> $DIR/ptr-to-trait-obj-wrap-add-auto.rs:32 :5
10339 |
10440LL | a as _
10541 | ^^^^^^ unsupported cast
10642 |
10743 = note: this could allow UB elsewhere
10844 = help: use `transmute` if you're sure this is sound
10945
110- error: aborting due to 9 previous errors
46+ error: aborting due to 5 previous errors
11147
112- Some errors have detailed explanations: E0277, E0804.
113- For more information about an error, try `rustc --explain E0277`.
48+ For more information about this error, try `rustc --explain E0804`.
0 commit comments