Merge branch 'unexpected-cfgs' into 'master'

add unexpected_cfgs lint

See merge request redox-os/relibc!999
This commit is contained in:
Jeremy Soller
2026-02-11 09:54:43 -07:00
3 changed files with 3 additions and 6 deletions
+1
View File
@@ -35,6 +35,7 @@ mismatched_lifetime_syntaxes = "deny"
non_camel_case_types = "allow"
non_snake_case = "allow" # TODO review occuurences
non_upper_case_globals = "allow" # TODO review occuurences
unexpected_cfgs = "deny"
unpredictable_function_pointer_comparisons = "deny"
unsafe_op_in_unsafe_fn = "deny"
unused_imports = "deny"
-4
View File
@@ -24,13 +24,11 @@ impl<'a, R: Read + ?Sized> Read for &'a mut R {
unsafe { (**self).initializer() }
}
#[cfg(feature = "alloc")]
#[inline]
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> io::Result<usize> {
(**self).read_to_end(buf)
}
#[cfg(feature = "alloc")]
#[inline]
fn read_to_string(&mut self, buf: &mut String) -> io::Result<usize> {
(**self).read_to_string(buf)
@@ -103,13 +101,11 @@ impl<R: Read + ?Sized> Read for Box<R> {
unsafe { (**self).initializer() }
}
#[cfg(feature = "alloc")]
#[inline]
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> io::Result<usize> {
(**self).read_to_end(buf)
}
#[cfg(feature = "alloc")]
#[inline]
fn read_to_string(&mut self, buf: &mut String) -> io::Result<usize> {
(**self).read_to_string(buf)
+2 -2
View File
@@ -20,11 +20,11 @@ mod pal;
pub use self::sys::Sys;
#[cfg(all(not(feature = "no_std"), target_os = "linux"))]
#[cfg(target_os = "linux")]
#[path = "linux/mod.rs"]
pub(crate) mod sys;
#[cfg(all(not(feature = "no_std"), target_os = "redox"))]
#[cfg(target_os = "redox")]
#[path = "redox/mod.rs"]
pub(crate) mod sys;