silence cast_lossless clippy lint from triggering inside macros

This commit is contained in:
auronandace
2026-06-11 09:42:47 +01:00
parent c7c5ab649d
commit 965941564d
4 changed files with 4 additions and 0 deletions
+1
View File
@@ -73,6 +73,7 @@ pub unsafe extern "C" fn strtoumax(
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/wcstoimax.html>.
#[expect(clippy::cast_lossless)] // not all users of `wcsto_impl!` are lossless
#[unsafe(no_mangle)]
pub unsafe extern "C" fn wcstoimax(
mut ptr: *const wchar_t,
+1
View File
@@ -30,6 +30,7 @@ macro_rules! wc_as_char {
};
}
#[expect(clippy::cast_lossless)] // not all users of `parse_type!` are lossless
pub unsafe fn inner_scanf<T: Kind>(
mut r: Reader<T>,
format: Reader<T>,
+1
View File
@@ -1473,6 +1473,7 @@ pub unsafe fn convert_integer(s: *const c_char, base: c_int) -> Option<(c_ulong,
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/strtod.html>.
#[expect(clippy::cast_lossless)] // not all users of `strto_float_impl!` are lossless
#[unsafe(no_mangle)]
pub unsafe extern "C" fn strtod(s: *const c_char, endptr: *mut *mut c_char) -> c_double {
strto_float_impl!(c_double, s, endptr)
+1
View File
@@ -863,6 +863,7 @@ pub unsafe extern "C" fn wcstol(
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/wcstoll.html>.
#[expect(clippy::cast_lossless)] // not all users of `wcsto_impl!` are lossless
#[unsafe(no_mangle)]
pub unsafe extern "C" fn wcstoll(
mut ptr: *const wchar_t,