mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
18 lines
253 B
Rust
18 lines
253 B
Rust
#![feature(auto_traits)]
|
|
#![feature(negative_impls)]
|
|
|
|
unsafe auto trait Trait {
|
|
fn method(&self) { //~ ERROR E0380
|
|
println!("Hello");
|
|
}
|
|
}
|
|
|
|
fn call_method<T: Trait>(x: T) {
|
|
x.method();
|
|
}
|
|
|
|
fn main() {
|
|
// ICE
|
|
call_method(());
|
|
}
|