blob: 6a27b07fa8b778737024895f6ffdf44f3dc1d800 [file] [log] [blame]
// compile-flags: -Z teach
trait SomeTrait {
fn foo();
}
fn main() {
let trait_obj: &dyn SomeTrait = SomeTrait;
//~^ ERROR expected value, found trait `SomeTrait`
//~| ERROR E0038
//~| method `foo` has no receiver
let &invalid = trait_obj;
//~^ ERROR E0033
}