Skip to content

Commit ae5ca20

Browse files
bors[bot]taiki-e
andauthored
Merge #658
658: Rename cfg(loom_crossbeam) to cfg(crossbeam_loom) r=jonhoo a=taiki-e It matches with the convention that *will* be documented in `loom`. See #487 (comment) for more. r? @jeehoonkang @jonhoo Co-authored-by: Taiki Endo <[email protected]>
2 parents d6eb687 + a9ff35f commit ae5ca20

File tree

18 files changed

+42
-42
lines changed

18 files changed

+42
-42
lines changed

ci/crossbeam-epoch-loom.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
cd "$(dirname "$0")"/../crossbeam-epoch
44
set -ex
55

6-
export RUSTFLAGS="-D warnings --cfg loom_crossbeam --cfg crossbeam_sanitize"
6+
export RUSTFLAGS="-D warnings --cfg crossbeam_loom --cfg crossbeam_sanitize"
77

88
# With MAX_PREEMPTIONS=2 the loom tests (currently) take around 11m.
99
# If we were to run with =3, they would take several times that,

crossbeam-epoch/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ memoffset = "0.6"
4141
#
4242
# This configuration option is outside of the normal semver guarantees: minor
4343
# versions of crossbeam may make breaking changes to it at any time.
44-
[target.'cfg(loom_crossbeam)'.dependencies]
44+
[target.'cfg(crossbeam_loom)'.dependencies]
4545
loom = "0.4"
4646

4747
[dependencies.crossbeam-utils]

crossbeam-epoch/src/atomic.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ impl<T: ?Sized + Pointable> Atomic<T> {
339339
/// let a = Atomic::<i32>::null();
340340
/// ```
341341
///
342-
#[cfg_attr(all(feature = "nightly", not(loom_crossbeam)), const_fn::const_fn)]
342+
#[cfg_attr(all(feature = "nightly", not(crossbeam_loom)), const_fn::const_fn)]
343343
pub fn null() -> Atomic<T> {
344344
Self {
345345
data: AtomicUsize::new(0),
@@ -794,14 +794,14 @@ impl<T: ?Sized + Pointable> Atomic<T> {
794794
/// }
795795
/// ```
796796
pub unsafe fn into_owned(self) -> Owned<T> {
797-
#[cfg(loom_crossbeam)]
797+
#[cfg(crossbeam_loom)]
798798
{
799799
// FIXME: loom does not yet support into_inner, so we use unsync_load for now,
800800
// which should have the same synchronization properties:
801801
// https://github.com/tokio-rs/loom/issues/117
802802
Owned::from_usize(self.data.unsync_load())
803803
}
804-
#[cfg(not(loom_crossbeam))]
804+
#[cfg(not(crossbeam_loom))]
805805
{
806806
Owned::from_usize(self.data.into_inner())
807807
}
@@ -1524,7 +1524,7 @@ impl<T: ?Sized + Pointable> Default for Shared<'_, T> {
15241524
}
15251525
}
15261526

1527-
#[cfg(all(test, not(loom_crossbeam)))]
1527+
#[cfg(all(test, not(crossbeam_loom)))]
15281528
mod tests {
15291529
use super::Shared;
15301530

crossbeam-epoch/src/collector.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
/// ```
1515
use core::fmt;
1616

17-
use crate::primitive::sync::Arc;
1817
use crate::guard::Guard;
1918
use crate::internal::{Global, Local};
19+
use crate::primitive::sync::Arc;
2020

2121
/// An epoch-based garbage collector.
2222
pub struct Collector {
@@ -109,7 +109,7 @@ impl fmt::Debug for LocalHandle {
109109
}
110110
}
111111

112-
#[cfg(all(test, not(loom_crossbeam)))]
112+
#[cfg(all(test, not(crossbeam_loom)))]
113113
mod tests {
114114
use std::mem;
115115
use std::sync::atomic::{AtomicUsize, Ordering};

crossbeam-epoch/src/default.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
//! destructed on thread exit, which in turn unregisters the thread.
66
77
use crate::collector::{Collector, LocalHandle};
8-
use crate::primitive::{lazy_static, thread_local};
98
use crate::guard::Guard;
9+
use crate::primitive::{lazy_static, thread_local};
1010

1111
lazy_static! {
1212
/// The global data for the default garbage collector.
@@ -45,7 +45,7 @@ where
4545
.unwrap_or_else(|_| f(&COLLECTOR.register()))
4646
}
4747

48-
#[cfg(all(test, not(loom_crossbeam)))]
48+
#[cfg(all(test, not(crossbeam_loom)))]
4949
mod tests {
5050
use crossbeam_utils::thread;
5151

crossbeam-epoch/src/deferred.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ impl Deferred {
7979
}
8080
}
8181

82-
#[cfg(all(test, not(loom_crossbeam)))]
82+
#[cfg(all(test, not(crossbeam_loom)))]
8383
mod tests {
8484
use super::Deferred;
8585
use std::cell::Cell;

crossbeam-epoch/src/internal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ impl IsElement<Local> for Local {
625625
}
626626
}
627627

628-
#[cfg(all(test, not(loom_crossbeam)))]
628+
#[cfg(all(test, not(crossbeam_loom)))]
629629
mod tests {
630630
use std::sync::atomic::{AtomicUsize, Ordering};
631631

crossbeam-epoch/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767

6868
use cfg_if::cfg_if;
6969

70-
#[cfg(loom_crossbeam)]
70+
#[cfg(crossbeam_loom)]
7171
#[allow(unused_imports, dead_code)]
7272
mod primitive {
7373
pub(crate) mod cell {
@@ -102,7 +102,7 @@ mod primitive {
102102
pub(crate) use loom::lazy_static;
103103
pub(crate) use loom::thread_local;
104104
}
105-
#[cfg(not(loom_crossbeam))]
105+
#[cfg(not(crossbeam_loom))]
106106
#[allow(unused_imports, dead_code)]
107107
mod primitive {
108108
#[cfg(any(feature = "alloc", feature = "std"))]

crossbeam-epoch/src/sync/list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ impl<'g, T: 'g, C: IsElement<T>> Iterator for Iter<'g, T, C> {
295295
}
296296
}
297297

298-
#[cfg(all(test, not(loom_crossbeam)))]
298+
#[cfg(all(test, not(crossbeam_loom)))]
299299
mod tests {
300300
use super::*;
301301
use crate::{Collector, Owned};

crossbeam-epoch/src/sync/queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ impl<T> Drop for Queue<T> {
215215
}
216216
}
217217

218-
#[cfg(all(test, not(loom_crossbeam)))]
218+
#[cfg(all(test, not(crossbeam_loom)))]
219219
mod test {
220220
use super::*;
221221
use crate::pin;

0 commit comments

Comments
 (0)