1 error[E0199]: implementing the trait `MySafeTrait` is not unsafe
2 --> $DIR/coherence-default-trait-impl.rs:8:1
4 LL | unsafe impl MySafeTrait for Foo {}
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 help: remove `unsafe` from this trait implementation
9 LL - unsafe impl MySafeTrait for Foo {}
10 LL + impl MySafeTrait for Foo {}
13 error[E0200]: the trait `MyUnsafeTrait` requires an `unsafe impl` declaration
14 --> $DIR/coherence-default-trait-impl.rs:13:1
16 LL | impl MyUnsafeTrait for Foo {}
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 = note: the trait `MyUnsafeTrait` enforces invariants that the compiler can't check. Review the trait documentation and make sure this implementation upholds those invariants before adding the `unsafe` keyword
20 help: add `unsafe` to this trait implementation
22 LL | unsafe impl MyUnsafeTrait for Foo {}
25 error: aborting due to 2 previous errors
27 Some errors have detailed explanations: E0199, E0200.
28 For more information about an error, try `rustc --explain E0199`.