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/sys/args/unix.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/sys/args/unix.rs')
| -rw-r--r-- | library/std/src/sys/args/unix.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/sys/args/unix.rs b/library/std/src/sys/args/unix.rs index a7b79ad396e..0dfbd5f03eb 100644 --- a/library/std/src/sys/args/unix.rs +++ b/library/std/src/sys/args/unix.rs @@ -88,7 +88,7 @@ pub fn args() -> Args { mod imp { use crate::ffi::c_char; use crate::ptr; - use crate::sync::atomic::{AtomicIsize, AtomicPtr, Ordering}; + use crate::sync::atomic::{Atomic, AtomicIsize, AtomicPtr, Ordering}; // The system-provided argc and argv, which we store in static memory // here so that we can defer the work of parsing them until its actually @@ -96,8 +96,8 @@ mod imp { // // Note that we never mutate argv/argc, the argv array, or the argv // strings, which allows the code in this file to be very simple. - static ARGC: AtomicIsize = AtomicIsize::new(0); - static ARGV: AtomicPtr<*const u8> = AtomicPtr::new(ptr::null_mut()); + static ARGC: Atomic<isize> = AtomicIsize::new(0); + static ARGV: Atomic<*mut *const u8> = AtomicPtr::new(ptr::null_mut()); unsafe fn really_init(argc: isize, argv: *const *const u8) { // These don't need to be ordered with each other or other stores, |
