summaryrefslogtreecommitdiffstats
path: root/src/test/ui/error-codes/E0033.rs
blob: e5f0530f45ff86ae0a5550512d394184db90fe58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
trait SomeTrait {
    fn foo(); //~ associated function `foo` has no `self` parameter
}

fn main() {
    let trait_obj: &dyn SomeTrait = SomeTrait;
    //~^ ERROR expected value, found trait `SomeTrait`
    //~| ERROR E0038

    let &invalid = trait_obj;
    //~^ ERROR E0033
}