diff options
author | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
commit | a990de90fe41456a23e58bd087d2f107d321f3a1 (patch) | |
tree | 15afc392522a9e85dc3332235e311b7d39352ea9 /vendor/rustix/src/bitcast.rs | |
parent | 3d48cd3f81164bbfc1a755dc1d4a9a02f98c8ddd (diff) | |
download | fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.tar.xz fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.zip |
Deleted vendor folder
Diffstat (limited to 'vendor/rustix/src/bitcast.rs')
-rw-r--r-- | vendor/rustix/src/bitcast.rs | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/vendor/rustix/src/bitcast.rs b/vendor/rustix/src/bitcast.rs deleted file mode 100644 index 77e0e63..0000000 --- a/vendor/rustix/src/bitcast.rs +++ /dev/null @@ -1,34 +0,0 @@ -//! The `bitcast` and `bitflags_bits` macros. - -#![allow(unused_macros)] - -// Ensure that the source and destination types are both primitive integer -// types and the same size, and then bitcast. -macro_rules! bitcast { - ($x:expr) => {{ - if false { - // Ensure the source and destinations are primitive integer types. - let _ = !$x; - let _ = $x as u8; - 0 - } else if false { - // Ensure that the source and destinations are the same size. - // SAFETY: This code is under an `if false`. - #[allow(unsafe_code, unused_unsafe, clippy::useless_transmute)] - unsafe { - ::core::mem::transmute($x) - } - } else { - // Do the conversion. - $x as _ - } - }}; -} - -/// Return a [`bitcast`] of the value of `$x.bits()`, where `$x` is a -/// `bitflags` type. -macro_rules! bitflags_bits { - ($x:expr) => {{ - bitcast!($x.bits()) - }}; -} |