fwd/vendor/bitflags/tests/compile-pass/redefinition/stringify.rs
John Doty 9c435dc440 Vendor dependencies
Let's see how I like this workflow.
2022-12-19 08:38:22 -08:00

19 lines
390 B
Rust

use bitflags::bitflags;
// Checks for possible errors caused by overriding names used by `bitflags!` internally.
#[allow(unused_macros)]
macro_rules! stringify {
($($t:tt)*) => { "..." };
}
bitflags! {
struct Test: u8 {
const A = 1;
}
}
fn main() {
// Just make sure we don't call the redefined `stringify` macro
assert_eq!(format!("{:?}", Test::A), "A");
}