2015-03-06 07:07:50 -06:00
|
|
|
#![feature(optin_builtin_traits)]
|
|
|
|
|
2017-12-03 06:56:53 -06:00
|
|
|
unsafe auto trait Trait {
|
2020-03-06 12:55:21 -06:00
|
|
|
fn method(&self) { //~ ERROR E0380
|
2015-03-06 07:07:50 -06:00
|
|
|
println!("Hello");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn call_method<T: Trait>(x: T) {
|
|
|
|
x.method();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
// ICE
|
|
|
|
call_method(());
|
|
|
|
}
|