blob: 582600e110ba0a00194eafc64922248639f99b47 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
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
}
|