rust/src/test/ui/issues/issue-23080.rs
2020-03-06 10:55:21 -08:00

17 lines
234 B
Rust

#![feature(optin_builtin_traits)]
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(());
}