Debian Codegraph @

.cargo/vendor/bitflags-1.3.2/tests/compile-pass/redefinition/stringify.rs

raw
1 use bitflags::bitflags;
2
3 // Checks for possible errors caused by overriding names used by `bitflags!` internally.
4
5 #[allow(unused_macros)]
6 macro_rules! stringify {
7 ($($t:tt)*) => { "..." };
8 }
9
10 bitflags! {
11 struct Test: u8 {
12 const A = 1;
13 }
14 }
15
16 fn main() {
17 // Just make sure we don't call the redefined `stringify` macro
18 assert_eq!(format!("{:?}", Test::A), "A");
19 }