Work around Clippy false positive on as c_char
This commit is contained in:
parent
db5a2ae6a4
commit
4e8b91a920
@ -46,6 +46,11 @@ macro_rules! type_alias {
|
||||
}
|
||||
|
||||
type_alias! { "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()))] }
|
||||
type_alias! { "schar.md", c_schar = i8, NonZero_c_schar = NonZeroI8; }
|
||||
type_alias! { "uchar.md", c_uchar = u8, NonZero_c_uchar = NonZeroU8; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user