diff options
| author | Christopher Durham <cad97@cad97.com> | 2024-09-19 00:15:03 -0400 |
|---|---|---|
| committer | Pavel Grigorenko <GrigorenkoPV@ya.ru> | 2025-04-27 02:18:08 +0300 |
| commit | 4d93f6056824c338751f19356d33bb61ce818749 (patch) | |
| tree | 44c5e3f9da28279a1e391f19ea6367677bf0adfa /library/std/src/backtrace.rs | |
| parent | 96b4ed90c658acf7f180bf1b95192b4f08802059 (diff) | |
| download | rust-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/backtrace.rs')
| -rw-r--r-- | library/std/src/backtrace.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/backtrace.rs b/library/std/src/backtrace.rs index 3683485640c..c3fcb0e2e42 100644 --- a/library/std/src/backtrace.rs +++ b/library/std/src/backtrace.rs @@ -92,8 +92,8 @@ use crate::backtrace_rs::{self, BytesOrWideString}; use crate::ffi::c_void; use crate::panic::UnwindSafe; use crate::sync::LazyLock; -use crate::sync::atomic::AtomicU8; use crate::sync::atomic::Ordering::Relaxed; +use crate::sync::atomic::{Atomic, AtomicU8}; use crate::sys::backtrace::{lock, output_filename, set_image_base}; use crate::{env, fmt}; @@ -254,7 +254,7 @@ impl Backtrace { // Cache the result of reading the environment variables to make // backtrace captures speedy, because otherwise reading environment // variables every time can be somewhat slow. - static ENABLED: AtomicU8 = AtomicU8::new(0); + static ENABLED: Atomic<u8> = AtomicU8::new(0); match ENABLED.load(Relaxed) { 0 => {} 1 => return false, |
