Skip to content

Commit 8e3e429

Browse files
authored
Merge pull request #555 from rust-lang/fix/build
Use target_has_atomic instead of the old atomic_cas cfg
2 parents 11eda98 + ce9f217 commit 8e3e429

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ where
12171217
///
12181218
/// Note that `Trace` is the maximum level, because it provides the maximum amount of detail in the emitted logs.
12191219
#[inline]
1220-
#[cfg(atomic_cas)]
1220+
#[cfg(target_has_atomic = "ptr")]
12211221
pub fn set_max_level(level: LevelFilter) {
12221222
MAX_LOG_LEVEL_FILTER.store(level as usize, Ordering::Relaxed);
12231223
}
@@ -1244,7 +1244,7 @@ pub fn set_max_level(level: LevelFilter) {
12441244
#[inline]
12451245
pub unsafe fn set_max_level_racy(level: LevelFilter) {
12461246
// `MAX_LOG_LEVEL_FILTER` uses a `Cell` as the underlying primitive when a
1247-
// platform doesn't support `atomic_cas`, so even though this looks the same
1247+
// platform doesn't support `target_has_atomic = "ptr"`, so even though this looks the same
12481248
// as `set_max_level` it may have different safety properties.
12491249
MAX_LOG_LEVEL_FILTER.store(level as usize, Ordering::Relaxed);
12501250
}

0 commit comments

Comments
 (0)