Description
git clone https://github.com/rust-lang/rustfmt
cd rustfmt
cargo b
Running the above commands will fail with the following error when using rustc 1.40.0-nightly (e413dc36a 2019-10-14)
in Linux, macOS and Windows:
Compiling crossbeam-channel v0.3.9
error[E0432]: unresolved import `crossbeam_utils::atomic`
--> /Users/seiichi.uchida/.cargo/registry/src/github.tiyicn.workers.dev-1ecc6299db9ec823/crossbeam-channel-0.3.9/src/flavors/tick.rs:8:22
|
8 | use crossbeam_utils::atomic::AtomicCell;
| ^^^^^^ could not find `atomic` in `crossbeam_utils`
I have tested with multiple recent nightlies. It turns out that the build started to fail since rustc 1.40.0-nightly (c27f7568b 2019-10-13)
. Building with rustc 1.40.0-nightly (1721c9685 2019-10-12)
or earlier succeeded without any error.
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]Fail to build rustfmt since [/-][+]Fail to build rustfmt since rustc 1.40.0-nightly (c27f7568b 2019-10-13)[/+]sinkuu commentedon Oct 15, 2019
crossbeam_utils::atomic
module is gated undercfg(all(target_has_atomic = "cas", target_has_atomic = "ptr"))
.https://github.com/crossbeam-rs/crossbeam/blob/ae148dec8eff2ee40dc4d6c11ae63d79bfd79b6e/crossbeam-utils/src/lib.rs#L47-L51
This module got disabled because the value of
cfg!(target_has_atomic)
was changed between two nightlies:sinkuu commentedon Oct 15, 2019
target_has_atomic = "cas"
was removed by #65214 (cfg_target_has_atomic
is a nightly feature), so this is an expected breakage.crossbeam-utils
crate has to be fixed.topecongiro commentedon Oct 15, 2019
@sinkuu Thank you for all the information! I will close this as it is an expected breakage.
Merge #428
Merge #428
Merge #428
Merge #428
--check
or--emit json
are used with stdin. rust-lang/rustfmt#3875disable rust-fmt in travis to see if our issue is rust-lang/rust#65424
disable rust-fmt in travis to see if our issue is rust-lang/rust#65424