about summary refs log tree commit diff
path: root/library/std/src/panic.rs
diff options
context:
space:
mode:
authorChristopher Durham <cad97@cad97.com>2024-09-19 00:15:03 -0400
committerPavel Grigorenko <GrigorenkoPV@ya.ru>2025-04-27 02:18:08 +0300
commit4d93f6056824c338751f19356d33bb61ce818749 (patch)
tree44c5e3f9da28279a1e391f19ea6367677bf0adfa /library/std/src/panic.rs
parent96b4ed90c658acf7f180bf1b95192b4f08802059 (diff)
downloadrust-4d93f6056824c338751f19356d33bb61ce818749.tar.gz
rust-4d93f6056824c338751f19356d33bb61ce818749.zip
use generic Atomic type where possible
in core/alloc/std only for now, and ignoring test files

Co-authored-by: Pavel Grigorenko <GrigorenkoPV@ya.ru>
Diffstat (limited to 'library/std/src/panic.rs')
-rw-r--r--library/std/src/panic.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/panic.rs b/library/std/src/panic.rs
index 22776ae2bc4..f3b26ac64df 100644
--- a/library/std/src/panic.rs
+++ b/library/std/src/panic.rs
@@ -3,7 +3,7 @@
 #![stable(feature = "std_panic", since = "1.9.0")]
 
 use crate::any::Any;
-use crate::sync::atomic::{AtomicU8, Ordering};
+use crate::sync::atomic::{Atomic, AtomicU8, Ordering};
 use crate::sync::{Condvar, Mutex, RwLock};
 use crate::thread::Result;
 use crate::{collections, fmt, panicking};
@@ -469,7 +469,7 @@ impl BacktraceStyle {
 // that backtrace.
 //
 // Internally stores equivalent of an Option<BacktraceStyle>.
-static SHOULD_CAPTURE: AtomicU8 = AtomicU8::new(0);
+static SHOULD_CAPTURE: Atomic<u8> = AtomicU8::new(0);
 
 /// Configures whether the default panic hook will capture and display a
 /// backtrace.