2024-02-22 06:10:29 -06:00
|
|
|
//@ revisions: cpass
|
2022-11-08 21:15:02 -06:00
|
|
|
|
|
|
|
#[derive(PartialEq, Eq)]
|
|
|
|
struct Id<'a> {
|
|
|
|
ns: &'a str,
|
|
|
|
}
|
|
|
|
fn visit_struct() {
|
|
|
|
let id = Id { ns: "random1" };
|
2023-02-14 03:17:34 -06:00
|
|
|
const FLAG: Id<'static> = Id { ns: "needs_to_be_the_same" };
|
2022-11-08 21:15:02 -06:00
|
|
|
match id {
|
|
|
|
FLAG => {}
|
|
|
|
_ => {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fn visit_struct2() {
|
|
|
|
let id = Id { ns: "random2" };
|
2023-02-14 03:17:34 -06:00
|
|
|
const FLAG: Id<'static> = Id { ns: "needs_to_be_the_same" };
|
2022-11-08 21:15:02 -06:00
|
|
|
match id {
|
|
|
|
FLAG => {}
|
|
|
|
_ => {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|