1
Fork 0

Remove #[cfg(all())] workarounds from c_char

This commit is contained in:
Alex Macleod 2023-06-10 13:07:04 +01:00
parent a77659a1e1
commit b607a8a4af
2 changed files with 0 additions and 10 deletions

View file

@ -52,11 +52,6 @@ macro_rules! type_alias {
} }
type_alias! { "c_char.md", c_char = c_char_definition::c_char, NonZero_c_char = c_char_definition::NonZero_c_char; type_alias! { "c_char.md", c_char = c_char_definition::c_char, NonZero_c_char = c_char_definition::NonZero_c_char;
// Make this type alias appear cfg-dependent so that Clippy does not suggest
// replacing `0 as c_char` with `0_i8`/`0_u8`. This #[cfg(all())] can be removed
// after the false positive in https://github.com/rust-lang/rust-clippy/issues/8093
// is fixed.
#[cfg(all())]
#[doc(cfg(all()))] } #[doc(cfg(all()))] }
type_alias! { "c_schar.md", c_schar = i8, NonZero_c_schar = NonZeroI8; } type_alias! { "c_schar.md", c_schar = i8, NonZero_c_schar = NonZeroI8; }

View file

@ -9,11 +9,6 @@ macro_rules! alias_core_ffi {
($($t:ident)*) => {$( ($($t:ident)*) => {$(
#[stable(feature = "raw_os", since = "1.1.0")] #[stable(feature = "raw_os", since = "1.1.0")]
#[doc = include_str!(concat!("../../../../core/src/ffi/", stringify!($t), ".md"))] #[doc = include_str!(concat!("../../../../core/src/ffi/", stringify!($t), ".md"))]
// Make this type alias appear cfg-dependent so that Clippy does not suggest
// replacing expressions like `0 as c_char` with `0_i8`/`0_u8`. This #[cfg(all())] can be
// removed after the false positive in https://github.com/rust-lang/rust-clippy/issues/8093
// is fixed.
#[cfg(all())]
#[doc(cfg(all()))] #[doc(cfg(all()))]
pub type $t = core::ffi::$t; pub type $t = core::ffi::$t;
)*} )*}