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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user