We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
as c_char
1 parent db5a2ae commit 4e8b91aCopy full SHA for 4e8b91a
library/std/src/os/raw/mod.rs
@@ -46,6 +46,11 @@ macro_rules! type_alias {
46
}
47
48
type_alias! { "char.md", c_char = c_char_definition::c_char, NonZero_c_char = c_char_definition::NonZero_c_char;
49
+// Make this type alias appear cfg-dependent so that Clippy does not suggest
50
+// replacing `0 as c_char` with `0_i8`/`0_u8`. This #[cfg(all())] can be removed
51
+// after the false positive in https://github.com/rust-lang/rust-clippy/issues/8093
52
+// is fixed.
53
+#[cfg(all())]
54
#[doc(cfg(all()))] }
55
type_alias! { "schar.md", c_schar = i8, NonZero_c_schar = NonZeroI8; }
56
type_alias! { "uchar.md", c_uchar = u8, NonZero_c_uchar = NonZeroU8; }
0 commit comments