1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#![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(()); }