Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ac0fd27

Browse files
committedJul 14, 2024
std: deny(unsafe_op_in_unsafe_fn) but allow sites
This provides a list of locations to hunt down issues in.
1 parent 3492a6b commit ac0fd27

File tree

9 files changed

+12
-1
lines changed

9 files changed

+12
-1
lines changed
 

‎std/src/collections/hash/map.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(unsafe_op_in_unsafe_fn)]
2+
13
#[cfg(test)]
24
mod tests;
35

‎std/src/env.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
//! and those without will return a [`String`].
1010
1111
#![stable(feature = "env", since = "1.0.0")]
12+
#![allow(unsafe_op_in_unsafe_fn)]
1213

1314
#[cfg(test)]
1415
mod tests;

‎std/src/ffi/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@
160160
//! [`from_wide`]: crate::os::windows::ffi::OsStringExt::from_wide "os::windows::ffi::OsStringExt::from_wide"
161161
162162
#![stable(feature = "rust1", since = "1.0.0")]
163+
#![allow(unsafe_op_in_unsafe_fn)]
163164

164165
#[unstable(feature = "c_str_module", issue = "112134")]
165166
pub mod c_str;

‎std/src/io/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@
293293
//! [`Arc`]: crate::sync::Arc
294294
295295
#![stable(feature = "rust1", since = "1.0.0")]
296+
#![allow(unsafe_op_in_unsafe_fn)]
296297

297298
#[cfg(test)]
298299
mod tests;

‎std/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@
252252
#![allow(internal_features)]
253253
#![deny(rustc::existing_doc_keyword)]
254254
#![deny(fuzzy_provenance_casts)]
255+
#![deny(unsafe_op_in_unsafe_fn)]
255256
#![allow(rustdoc::redundant_explicit_links)]
256257
// Ensure that std can be linked against panic_abort despite compiled with `-C panic=unwind`
257258
#![deny(ffi_unwind_calls)]
@@ -664,7 +665,7 @@ pub mod alloc;
664665
mod panicking;
665666

666667
#[path = "../../backtrace/src/lib.rs"]
667-
#[allow(dead_code, unused_attributes, fuzzy_provenance_casts)]
668+
#[allow(dead_code, unused_attributes, fuzzy_provenance_casts, unsafe_op_in_unsafe_fn)]
668669
mod backtrace_rs;
669670

670671
// Re-export macros defined in core.

‎std/src/os/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
#![stable(feature = "os", since = "1.0.0")]
44
#![allow(missing_docs, nonstandard_style, missing_debug_implementations)]
5+
#![allow(unsafe_op_in_unsafe_fn)]
56

67
pub mod raw;
78

‎std/src/sync/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@
157157
//! [`RwLock`]: crate::sync::RwLock
158158
159159
#![stable(feature = "rust1", since = "1.0.0")]
160+
#![allow(unsafe_op_in_unsafe_fn)]
160161

161162
#[stable(feature = "rust1", since = "1.0.0")]
162163
pub use alloc_crate::sync::{Arc, Weak};

‎std/src/sys/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(unsafe_op_in_unsafe_fn)]
2+
13
/// The PAL (platform abstraction layer) contains platform-specific abstractions
24
/// for implementing the features in the other submodules, e.g. UNIX file
35
/// descriptors.

‎std/src/sys_common/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
1717
#![allow(missing_docs)]
1818
#![allow(missing_debug_implementations)]
19+
#![allow(unsafe_op_in_unsafe_fn)]
1920

2021
#[cfg(test)]
2122
mod tests;

0 commit comments

Comments
 (0)
Failed to load comments.