blob: 02f4f5d42e74db97cd689d27755ba243886de98a [file] [log] [blame]
许杰友 Jieyou Xu (Joe)6e48b962024-02-22 12:10:291//@ revisions: cpass
Jack Huey1bf8f872022-11-09 03:15:022
3#[derive(PartialEq, Eq)]
4struct Id<'a> {
5 ns: &'a str,
6}
7fn visit_struct() {
8 let id = Id { ns: "random1" };
Oli Schererd030ece2023-02-14 09:17:349 const FLAG: Id<'static> = Id { ns: "needs_to_be_the_same" };
Jack Huey1bf8f872022-11-09 03:15:0210 match id {
11 FLAG => {}
12 _ => {}
13 }
14}
15fn visit_struct2() {
16 let id = Id { ns: "random2" };
Oli Schererd030ece2023-02-14 09:17:3417 const FLAG: Id<'static> = Id { ns: "needs_to_be_the_same" };
Jack Huey1bf8f872022-11-09 03:15:0218 match id {
19 FLAG => {}
20 _ => {}
21 }
22}
23
24fn main() {}