Skip to content

Commit

Permalink
Merge #428
Browse files Browse the repository at this point in the history
428: Fix breakage with nightly feature r=jeehoonkang a=taiki-e

`target_has_atomic = "cas"` was removed in rust-lang/rust#65214.

Fixes rust-lang/rust#65424 
Fixes #412


Co-authored-by: Taiki Endo <te316e89@gmail.com>
  • Loading branch information
bors[bot] and taiki-e committed Oct 15, 2019
2 parents ae148de + 4dce6d7 commit aeb311d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Expand Up @@ -16,24 +16,31 @@ matrix:
- rust: 1.28.0
name: "crossbeam on 1.28.0"
script: ./ci/crossbeam.sh
before_script: ./ci/downgrade-dependencies.sh
- rust: 1.26.0
name: "crossbeam-channel on 1.26.0"
script: ./ci/crossbeam-channel.sh
before_script: ./ci/downgrade-dependencies.sh
- rust: 1.28.0
name: "crossbeam-deque on 1.28.0"
script: ./ci/crossbeam-deque.sh
before_script: ./ci/downgrade-dependencies.sh
- rust: 1.26.0
name: "crossbeam-epoch on 1.26.0"
script: ./ci/crossbeam-epoch.sh
before_script: ./ci/downgrade-dependencies.sh
- rust: 1.26.0
name: "crossbeam-queue on 1.26.0"
script: ./ci/crossbeam-queue.sh
before_script: ./ci/downgrade-dependencies.sh
- rust: 1.28.0
name: "crossbeam-skiplist on 1.28.0"
script: ./ci/crossbeam-skiplist.sh
before_script: ./ci/downgrade-dependencies.sh
- rust: 1.26.0
name: "crossbeam-utils on 1.26.0"
script: ./ci/crossbeam-utils.sh
before_script: ./ci/downgrade-dependencies.sh

# Test crates on nightly Rust.
- rust: nightly
Expand Down
5 changes: 5 additions & 0 deletions ci/downgrade-dependencies.sh
@@ -0,0 +1,5 @@
# lazy_static 1.4 requires Rust 1.27+
# and cfg-if 1.10 requires Rust 1.31+ so downgrade it.
- cargo generate-lockfile
- cargo update -p cfg-if --precise 1.9
- cargo update -p lazy_static --precise 1.3
5 changes: 1 addition & 4 deletions crossbeam-epoch/src/lib.rs
Expand Up @@ -73,10 +73,7 @@ cfg_if! {
}
}

#[cfg_attr(
feature = "nightly",
cfg(all(target_has_atomic = "cas", target_has_atomic = "ptr"))
)]
#[cfg_attr(feature = "nightly", cfg(target_has_atomic = "ptr"))]
cfg_if! {
if #[cfg(any(feature = "alloc", feature = "std"))] {
extern crate crossbeam_utils;
Expand Down
5 changes: 1 addition & 4 deletions crossbeam-skiplist/src/lib.rs
Expand Up @@ -18,10 +18,7 @@ cfg_if! {
}
}

#[cfg_attr(
feature = "nightly",
cfg(all(target_has_atomic = "cas", target_has_atomic = "ptr"))
)]
#[cfg_attr(feature = "nightly", cfg(target_has_atomic = "ptr"))]
cfg_if! {
if #[cfg(any(feature = "alloc", feature = "std"))] {
extern crate crossbeam_epoch as epoch;
Expand Down
5 changes: 1 addition & 4 deletions crossbeam-utils/src/lib.rs
Expand Up @@ -44,10 +44,7 @@ cfg_if! {
}
}

#[cfg_attr(
feature = "nightly",
cfg(all(target_has_atomic = "cas", target_has_atomic = "ptr"))
)]
#[cfg_attr(feature = "nightly", cfg(target_has_atomic = "ptr"))]
pub mod atomic;

mod cache_padded;
Expand Down
5 changes: 1 addition & 4 deletions src/lib.rs
Expand Up @@ -68,10 +68,7 @@ pub use _epoch::crossbeam_epoch as epoch;

extern crate crossbeam_utils;

#[cfg_attr(
feature = "nightly",
cfg(all(target_has_atomic = "cas", target_has_atomic = "ptr"))
)]
#[cfg_attr(feature = "nightly", cfg(target_has_atomic = "ptr"))]
pub use crossbeam_utils::atomic;

/// Miscellaneous utilities.
Expand Down

0 comments on commit aeb311d

Please sign in to comment.