os-rust/src/test/ui/error-codes/E0033.rs
2018-12-25 21:08:33 -07:00

13 lines
258 B
Rust

trait SomeTrait {
fn foo();
}
fn main() {
let trait_obj: &SomeTrait = SomeTrait;
//~^ ERROR expected value, found trait `SomeTrait`
//~| ERROR E0038
//~| method `foo` has no receiver
let &invalid = trait_obj;
//~^ ERROR E0033
}