1
Fork 0
rust/src/test/ui/coherence/coherence-default-trait-impl.rs

16 lines
328 B
Rust
Raw Normal View History

2015-01-27 01:07:31 +01:00
#![feature(optin_builtin_traits)]
auto trait MySafeTrait {}
2015-01-27 01:07:31 +01:00
struct Foo;
unsafe impl MySafeTrait for Foo {}
//~^ ERROR implementing the trait `MySafeTrait` is not unsafe
unsafe auto trait MyUnsafeTrait {}
impl MyUnsafeTrait for Foo {}
//~^ ERROR the trait `MyUnsafeTrait` requires an `unsafe impl` declaration
2015-01-27 01:07:31 +01:00
fn main() {}