Initial vendor packages
Signed-off-by: Valentin Popov <valentin@popov.link>
This commit is contained in:
17
vendor/bitflags-1.3.2/tests/compile-pass/impls/convert.rs
vendored
Normal file
17
vendor/bitflags-1.3.2/tests/compile-pass/impls/convert.rs
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
use bitflags::bitflags;
|
||||
|
||||
bitflags! {
|
||||
struct Flags: u32 {
|
||||
const A = 0b00000001;
|
||||
}
|
||||
}
|
||||
|
||||
impl From<u32> for Flags {
|
||||
fn from(v: u32) -> Flags {
|
||||
Flags::from_bits_truncate(v)
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
||||
}
|
10
vendor/bitflags-1.3.2/tests/compile-pass/impls/default.rs
vendored
Normal file
10
vendor/bitflags-1.3.2/tests/compile-pass/impls/default.rs
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
use bitflags::bitflags;
|
||||
|
||||
bitflags! {
|
||||
#[derive(Default)]
|
||||
struct Flags: u32 {
|
||||
const A = 0b00000001;
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
15
vendor/bitflags-1.3.2/tests/compile-pass/impls/inherent_methods.rs
vendored
Normal file
15
vendor/bitflags-1.3.2/tests/compile-pass/impls/inherent_methods.rs
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
use bitflags::bitflags;
|
||||
|
||||
bitflags! {
|
||||
struct Flags: u32 {
|
||||
const A = 0b00000001;
|
||||
}
|
||||
}
|
||||
|
||||
impl Flags {
|
||||
pub fn new() -> Flags {
|
||||
Flags::A
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
Reference in New Issue
Block a user