Skip to content

Commit

Permalink
Convert race to a default-enabled feature for targets without atomics.
Browse files Browse the repository at this point in the history
  • Loading branch information
cr1901 committed Feb 24, 2021
1 parent 97027d5 commit becaede
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ default = ["std"]
# Enables `once_cell::sync` module.
std = ["alloc"]
# Enables `once_cell::race::OnceBox` type.
alloc = []
alloc = ["race"]
# Enables `once_cell::race` module.
race = []
# Enables semver-exempt APIs of this crate.
# At the moment, this feature is unused.
unstable = []
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1065,4 +1065,5 @@ pub mod sync {
fn _dummy() {}
}

#[cfg(feature = "race")]
pub mod race;
2 changes: 1 addition & 1 deletion tests/it.rs
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ mod sync {
}
}

#[cfg(feature = "unstable")]
#[cfg(all(feature = "unstable", feature = "race"))]
mod race {
use std::{
num::NonZeroUsize,
Expand Down

0 comments on commit becaede

Please sign in to comment.