aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-2479.rs
blob: 5cc403eef9e2063f4ab03c28b398d656e12533bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#![allow(unused)]
fn main() {
enum Dragon {
    Born,
}

fn oblivion() -> Dragon::Born {
// { dg-error "expected type, found variant of .Dragon::Born." "" { target *-*-* } .-1 }
// { dg-error "failed to resolve return type" "" { target *-*-* } .-2 }
    Dragon::Born
}

enum Wizard {
    Gandalf,
    Saruman,
}

trait Isengard {
    fn wizard(_: Wizard::Saruman);
    // { dg-error "expected type, found variant of .Wizard::Saruman." "" { target *-*-* } .-1 }
}
}