diff --git a/generic-rt/src/lib.rs b/generic-rt/src/lib.rs index 064444afee..9634ca83d0 100644 --- a/generic-rt/src/lib.rs +++ b/generic-rt/src/lib.rs @@ -1,6 +1,5 @@ #![no_std] #![allow(internal_features)] -#![feature(core_intrinsics)] #![deny(unsafe_op_in_unsafe_fn)] use core::{ diff --git a/redox-rt/src/proc.rs b/redox-rt/src/proc.rs index 7a07a84008..56c52f13de 100644 --- a/redox-rt/src/proc.rs +++ b/redox-rt/src/proc.rs @@ -713,6 +713,7 @@ impl<'a> MmapGuard<'a> { Ok(()) } + #[expect(clippy::mut_from_ref)] pub unsafe fn map_mut_anywhere( fd: &'a FdGuardUpper, offset: usize, diff --git a/redox-rt/src/sys.rs b/redox-rt/src/sys.rs index 3aadf6d37e..d7621d092e 100644 --- a/redox-rt/src/sys.rs +++ b/redox-rt/src/sys.rs @@ -953,6 +953,10 @@ impl FdTbl { pub const CONTEXT_MAX_FILES: u32 = 65_536; pub const DEFAULT_CAPACITY: usize = usize::BITS as usize; + #[expect( + clippy::new_without_default, + reason = "default not expected for this type" + )] pub const fn new() -> Self { Self { fd: None, @@ -1267,6 +1271,10 @@ bitflags::bitflags! { } impl PosixFdTbl { + #[expect( + clippy::new_without_default, + reason = "default not expected for this type" + )] pub const fn new() -> Self { Self { table: Vec::new(), @@ -1595,6 +1603,10 @@ pub struct UpperFdTbl { } impl UpperFdTbl { + #[expect( + clippy::new_without_default, + reason = "default not expected for this type" + )] pub const fn new() -> Self { Self { table: Vec::new(), diff --git a/src/c_str.rs b/src/c_str.rs index 8ed3cdea7a..7403b77ee9 100644 --- a/src/c_str.rs +++ b/src/c_str.rs @@ -258,6 +258,7 @@ impl<'a, T: Kind> NulStr<'a, T> { /// Scan the string to get its length. #[doc(alias = "strlen")] #[doc(alias = "wcslen")] + #[expect(clippy::len_without_is_empty, reason = "len() signature intentional")] pub fn len(self) -> usize { self.to_chars().len() } diff --git a/src/macros.rs b/src/macros.rs index d36f9c7ef7..a964963b17 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -117,6 +117,7 @@ macro_rules! trace_expr { // log::trace! but functions inside them will // not be evaluated or compiled unless enabled +#[cfg(target_os = "redox")] // currently only used in redox macro_rules! trace_log { ($($arg:tt)+) => { #[cfg(not(feature = "no_trace"))]