summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/issues/issue-111692.rs
blob: 56096f706a8a7c647cd67e2feaa4c08881006520 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
mod module {
    #[derive(Eq, PartialEq)]
    pub struct Type {
        pub x: u8,
        pub y: u8,
    }

    pub const C: u8 = 32u8;
}

fn test(x: module::Type) {
    if x == module::Type { x: module::C, y: 1 } { //~ ERROR invalid struct literal
    }
}

fn test2(x: module::Type) {
    if x ==module::Type { x: module::C, y: 1 } { //~ ERROR invalid struct literal
    }
}


fn test3(x: module::Type) {
    if x == Type { x: module::C, y: 1 } { //~ ERROR invalid struct literal
    }
}

fn test4(x: module::Type) {
    if x == demo_module::Type { x: module::C, y: 1 } { //~ ERROR invalid struct literal
    }
}

fn main() { }