summaryrefslogtreecommitdiffstats
path: root/tests/incremental/issue-101518.rs
blob: 39373da6a9f605ae7a52f85d7d9306f1d6b7b43e (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
// revisions: cpass

#[derive(PartialEq, Eq)]
struct Id<'a> {
    ns: &'a str,
}
fn visit_struct() {
    let id = Id { ns: "random1" };
    const FLAG: Id<'static> = Id { ns: "needs_to_be_the_same" };
    match id {
        FLAG => {}
        _ => {}
    }
}
fn visit_struct2() {
    let id = Id { ns: "random2" };
    const FLAG: Id<'static> = Id { ns: "needs_to_be_the_same" };
    match id {
        FLAG => {}
        _ => {}
    }
}

fn main() {}