Skip to content

Commit

Permalink
Add #![allow(unsafe_op_in_unsafe_fn)] in sys/hermit
Browse files Browse the repository at this point in the history
  • Loading branch information
maekawatoshiki committed Aug 21, 2020
1 parent 3a46cca commit d94258e
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions library/std/src/sys/hermit/alloc.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(unsafe_op_in_unsafe_fn)]

use crate::alloc::{GlobalAlloc, Layout, System};
use crate::ptr;
use crate::sys::hermit::abi;
Expand Down
2 changes: 2 additions & 0 deletions library/std/src/sys/hermit/args.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(unsafe_op_in_unsafe_fn)]

use crate::ffi::OsString;
use crate::marker::PhantomData;
use crate::vec;
Expand Down
2 changes: 2 additions & 0 deletions library/std/src/sys/hermit/condvar.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(unsafe_op_in_unsafe_fn)]

use crate::ffi::c_void;
use crate::ptr;
use crate::sync::atomic::{AtomicUsize, Ordering::SeqCst};
Expand Down
1 change: 1 addition & 0 deletions library/std/src/sys/hermit/fd.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![unstable(reason = "not public", issue = "none", feature = "fd")]
#![allow(unsafe_op_in_unsafe_fn)]

use crate::io::{self, ErrorKind, Read};
use crate::mem;
Expand Down
2 changes: 2 additions & 0 deletions library/std/src/sys/hermit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
//! compiling for wasm. That way it's a compile time error for something that's
//! guaranteed to be a runtime error!

#![allow(unsafe_op_in_unsafe_fn)]

use crate::intrinsics;
use crate::os::raw::c_char;

Expand Down
2 changes: 2 additions & 0 deletions library/std/src/sys/hermit/mutex.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(unsafe_op_in_unsafe_fn)]

use crate::ffi::c_void;
use crate::ptr;
use crate::sys::hermit::abi;
Expand Down
2 changes: 2 additions & 0 deletions library/std/src/sys/hermit/os.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(unsafe_op_in_unsafe_fn)]

use crate::collections::HashMap;
use crate::error::Error as StdError;
use crate::ffi::{CStr, OsStr, OsString};
Expand Down
2 changes: 2 additions & 0 deletions library/std/src/sys/hermit/rwlock.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(unsafe_op_in_unsafe_fn)]

use crate::cell::UnsafeCell;
use crate::sys::condvar::Condvar;
use crate::sys::mutex::Mutex;
Expand Down
1 change: 1 addition & 0 deletions library/std/src/sys/hermit/thread.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![allow(dead_code)]
#![allow(unsafe_op_in_unsafe_fn)]

use crate::ffi::CStr;
use crate::io;
Expand Down
1 change: 1 addition & 0 deletions library/std/src/sys/hermit/thread_local_dtor.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![cfg(target_thread_local)]
#![unstable(feature = "thread_local_internals", issue = "none")]
#![allow(unsafe_op_in_unsafe_fn)]

// Simplify dtor registration by using a list of destructors.
// The this solution works like the implementation of macOS and
Expand Down

0 comments on commit d94258e

Please sign in to comment.