rust/tests/incremental/issue-101518.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
452 B
Rust
Raw Normal View History

// revisions: cpass
2022-11-09 03:15:02 +00:00
#[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" };
2022-11-09 03:15:02 +00:00
match id {
FLAG => {}
_ => {}
}
}
fn visit_struct2() {
let id = Id { ns: "random2" };
const FLAG: Id<'static> = Id { ns: "needs_to_be_the_same" };
2022-11-09 03:15:02 +00:00
match id {
FLAG => {}
_ => {}
}
}
fn main() {}