rust/src/test/ui/traits/trait-safety-trait-impl.stderr

17 lines
621 B
Plaintext
Raw Normal View History

2018-08-08 14:28:26 +02:00
error[E0200]: the trait `UnsafeTrait` requires an `unsafe impl` declaration
2018-12-25 08:56:47 -07:00
--> $DIR/trait-safety-trait-impl.rs:14:1
2018-08-08 14:28:26 +02:00
|
LL | impl UnsafeTrait for u16 { } //~ ERROR requires an `unsafe impl` declaration
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0199]: implementing the trait `SafeTrait` is not unsafe
2018-12-25 08:56:47 -07:00
--> $DIR/trait-safety-trait-impl.rs:16:1
2018-08-08 14:28:26 +02:00
|
LL | unsafe impl SafeTrait for u32 { } //~ ERROR the trait `SafeTrait` is not unsafe
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
Some errors occurred: E0199, E0200.
For more information about an error, try `rustc --explain E0199`.