Initial vendor packages
Signed-off-by: Valentin Popov <valentin@popov.link>
This commit is contained in:
14
vendor/bitflags-1.3.2/tests/compile-pass/redefinition/core.rs
vendored
Normal file
14
vendor/bitflags-1.3.2/tests/compile-pass/redefinition/core.rs
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
use bitflags::bitflags;
|
||||
|
||||
// Checks for possible errors caused by overriding names used by `bitflags!` internally.
|
||||
|
||||
mod core {}
|
||||
mod _core {}
|
||||
|
||||
bitflags! {
|
||||
struct Test: u8 {
|
||||
const A = 1;
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
19
vendor/bitflags-1.3.2/tests/compile-pass/redefinition/stringify.rs
vendored
Normal file
19
vendor/bitflags-1.3.2/tests/compile-pass/redefinition/stringify.rs
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
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");
|
||||
}
|
Reference in New Issue
Block a user