summaryrefslogtreecommitdiffstats
path: root/tests/ui/error-codes/E0033.rs
blob: bd6ec20722313a9c56170ca87161b21031fbb5e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
trait SomeTrait {
    fn foo(&self);
}
struct S;
impl SomeTrait for S {
    fn foo(&self) {}
}
fn main() {
    let trait_obj: &dyn SomeTrait = &S;

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