Disallow missing unsafe blocks in unsafe fn in panicking.rs
This adds SAFETY comments where necessary, explaining the preconditions and how they are respected.
This commit is contained in:
parent
2c28244cf0
commit
82ccdab96c
2 changed files with 49 additions and 7 deletions
|
@ -172,7 +172,11 @@ macro_rules! __thread_local_inner {
|
|||
static __KEY: $crate::thread::__OsLocalKeyInner<$t> =
|
||||
$crate::thread::__OsLocalKeyInner::new();
|
||||
|
||||
__KEY.get(__init)
|
||||
// FIXME: remove the #[allow(...)] marker when macros don't
|
||||
// raise warning for missing/extraneous unsafe blocks anymore.
|
||||
// See https://github.com/rust-lang/rust/issues/74838.
|
||||
#[allow(unused_unsafe)]
|
||||
unsafe { __KEY.get(__init) }
|
||||
}
|
||||
|
||||
unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue