fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0371]: the object type `(dyn Object + Marker2 + 'static)` automatically implements the trait `Marker1` 2 --> $DIR/coherence-impl-trait-for-marker-trait-positive.rs:15:1 3 | 4LL | impl Marker1 for dyn Object + Marker2 {} 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Object + Marker2 + 'static)` automatically implements trait `Marker1` 6 7error[E0321]: traits with a default impl, like `Marker1`, cannot be implemented for trait object `(dyn Object + Marker2 + 'static)` 8 --> $DIR/coherence-impl-trait-for-marker-trait-positive.rs:15:1 9 | 10LL | impl Marker1 for dyn Object + Marker2 {} 11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 12 | 13 = note: a trait object implements `Marker1` if and only if `Marker1` is one of the trait object's trait bounds 14 15error[E0371]: the object type `(dyn Object + Marker2 + 'static)` automatically implements the trait `Marker2` 16 --> $DIR/coherence-impl-trait-for-marker-trait-positive.rs:18:1 17 | 18LL | impl Marker2 for dyn Object + Marker2 {} 19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Object + Marker2 + 'static)` automatically implements trait `Marker2` 20 21error[E0321]: traits with a default impl, like `Marker2`, cannot be implemented for trait object `(dyn Object + Marker2 + 'static)` 22 --> $DIR/coherence-impl-trait-for-marker-trait-positive.rs:18:1 23 | 24LL | impl Marker2 for dyn Object + Marker2 {} 25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 26 | 27 = note: a trait object implements `Marker2` if and only if `Marker2` is one of the trait object's trait bounds 28 29error[E0321]: traits with a default impl, like `Marker2`, cannot be implemented for trait object `(dyn Object + 'static)` 30 --> $DIR/coherence-impl-trait-for-marker-trait-positive.rs:26:1 31 | 32LL | impl Marker2 for dyn Object {} 33 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 34 | 35 = note: a trait object implements `Marker2` if and only if `Marker2` is one of the trait object's trait bounds 36 37error[E0117]: only traits defined in the current crate can be implemented for arbitrary types 38 --> $DIR/coherence-impl-trait-for-marker-trait-positive.rs:22:1 39 | 40LL | unsafe impl Send for dyn Marker2 {} 41 | ^^^^^^^^^^^^^^^^^^^^^----------- 42 | | | 43 | | `dyn Marker2` is not defined in the current crate 44 | impl doesn't use only types from inside the current crate 45 | 46 = note: define and implement a trait or new type instead 47 48error[E0321]: cross-crate traits with a default impl, like `Send`, can only be implemented for a struct/enum type, not `(dyn Object + 'static)` 49 --> $DIR/coherence-impl-trait-for-marker-trait-positive.rs:27:1 50 | 51LL | unsafe impl Send for dyn Object {} 52 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type 53 54error[E0321]: cross-crate traits with a default impl, like `Send`, can only be implemented for a struct/enum type, not `(dyn Object + Marker2 + 'static)` 55 --> $DIR/coherence-impl-trait-for-marker-trait-positive.rs:28:1 56 | 57LL | unsafe impl Send for dyn Object + Marker2 {} 58 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type 59 60error[E0321]: traits with a default impl, like `Marker3`, cannot be implemented for generic type `T` 61 --> $DIR/coherence-impl-trait-for-marker-trait-positive.rs:32:1 62 | 63LL | impl<T: ?Sized> Marker3 for T {} 64 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 65 | 66 = note: a trait object implements `Marker3` if and only if `Marker3` is one of the trait object's trait bounds 67 68error: aborting due to 9 previous errors 69 70Some errors have detailed explanations: E0117, E0321, E0371. 71For more information about an error, try `rustc --explain E0117`.