rust/tests/ui/auto-traits/issue-23080.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
253 B
Rust
Raw Normal View History

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