fparkan/vendor/bitflags-1.3.2/tests/compile-pass/impls/convert.rs
Valentin Popov 1b6a04ca55
Initial vendor packages
Signed-off-by: Valentin Popov <valentin@popov.link>
2024-01-08 01:21:28 +04:00

18 lines
219 B
Rust

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() {
}