rust/src/test/ui/error-codes/E0206.rs
2018-12-25 21:08:33 -07:00

14 lines
353 B
Rust

type Foo = [u8; 256];
impl Copy for Foo { }
//~^ ERROR the trait `Copy` may not be implemented for this type
//~| ERROR only traits defined in the current crate can be implemented for arbitrary types
#[derive(Copy, Clone)]
struct Bar;
impl Copy for &'static mut Bar { }
//~^ ERROR the trait `Copy` may not be implemented for this type
fn main() {
}