Clippy Mutex/AtomicBool error on Manjaro after cargo update (10-15-2015 nightly)
0joshuaolson1 opened this issue · 3 comments
0joshuaolson1 commented
BTW, could you please rephrase the readme to say X nightly build or later? I have no idea how to get outdated nightlies.
Compiling playform-common v0.0.0 (file:///home/sideburnetic/playform-master/server)
Running `rustc /home/sideburnetic/playform-master/common/mod.rs --crate-name common --crate-type lib -C opt-level=3 -C metadata=c5bacb62f0b2fc49 -C extra-filename=-c5bacb62f0b2fc49 --out-dir /home/sideburnetic/playform-master/server/target/release/deps --emit=dep-info,link -L dependency=/home/sideburnetic/playform-master/server/target/release/deps -L dependency=/home/sideburnetic/playform-master/server/target/release/deps --extern cgmath=/home/sideburnetic/playform-master/server/target/release/deps/libcgmath-f3e1b3f5127cefaf.rlib --extern nanomsg=/home/sideburnetic/playform-master/server/target/release/deps/libnanomsg-233840efd74a5eea.rlib --extern num=/home/sideburnetic/playform-master/server/target/release/deps/libnum-397f282c1d72fe58.rlib --extern log=/home/sideburnetic/playform-master/server/target/release/deps/liblog-f18a3e885170bd3f.rlib --extern time=/home/sideburnetic/playform-master/server/target/release/deps/libtime-60470bfe19faf27e.rlib --extern serialize=/home/sideburnetic/playform-master/server/target/release/deps/libserialize-5eb5a294f1a9f9a0.rlib --extern clippy=/home/sideburnetic/playform-master/server/target/release/deps/libclippy-eaf07b4b6054fb62.so --extern stopwatch=/home/sideburnetic/playform-master/server/target/release/deps/libstopwatch-a300f3c25a2f3a5d.rlib -L ../nanomsg-0.6-beta/.libs`
Compiling isosurface-extraction v0.0.0 (https://github.com/bfops/rust-isosurface-extraction#d3cf8634)
Running `rustc /home/sideburnetic/.cargo/git/checkouts/rust-isosurface-extraction-8ab480b9cc579fdc/master/./src/mod.rs --crate-name isosurface_extraction --crate-type lib -C opt-level=3 -C metadata=173d0c146fc269d1 -C extra-filename=-173d0c146fc269d1 --out-dir /home/sideburnetic/playform-master/server/target/release/deps --emit=dep-info,link -L dependency=/home/sideburnetic/playform-master/server/target/release/deps -L dependency=/home/sideburnetic/playform-master/server/target/release/deps --extern voxel_data=/home/sideburnetic/playform-master/server/target/release/deps/libvoxel_data-4be79e0adc3fccbf.rlib --extern clippy=/home/sideburnetic/playform-master/server/target/release/deps/libclippy-eaf07b4b6054fb62.so --extern cgmath=/home/sideburnetic/playform-master/server/target/release/deps/libcgmath-f3e1b3f5127cefaf.rlib --extern log=/home/sideburnetic/playform-master/server/target/release/deps/liblog-f18a3e885170bd3f.rlib --cap-lints allow`
Compiling terrain v0.0.0 (file:///home/sideburnetic/playform-master/server)
Running `rustc terrain/mod.rs --crate-name terrain --crate-type lib -C opt-level=3 -C metadata=ecf0a73df2c769ad -C extra-filename=-ecf0a73df2c769ad --out-dir /home/sideburnetic/playform-master/server/target/release/deps --emit=dep-info,link -L dependency=/home/sideburnetic/playform-master/server/target/release/deps -L dependency=/home/sideburnetic/playform-master/server/target/release/deps --extern rand=/home/sideburnetic/playform-master/server/target/release/deps/librand-bdfcc55d3466feb3.rlib --extern cgmath=/home/sideburnetic/playform-master/server/target/release/deps/libcgmath-f3e1b3f5127cefaf.rlib --extern time=/home/sideburnetic/playform-master/server/target/release/deps/libtime-60470bfe19faf27e.rlib --extern common=/home/sideburnetic/playform-master/server/target/release/deps/libcommon-c5bacb62f0b2fc49.rlib --extern isosurface_extraction=/home/sideburnetic/playform-master/server/target/release/deps/libisosurface_extraction-173d0c146fc269d1.rlib --extern log=/home/sideburnetic/playform-master/server/target/release/deps/liblog-f18a3e885170bd3f.rlib --extern stopwatch=/home/sideburnetic/playform-master/server/target/release/deps/libstopwatch-a300f3c25a2f3a5d.rlib --extern voxel_data=/home/sideburnetic/playform-master/server/target/release/deps/libvoxel_data-4be79e0adc3fccbf.rlib --extern clippy=/home/sideburnetic/playform-master/server/target/release/deps/libclippy-eaf07b4b6054fb62.so --extern noise=/home/sideburnetic/playform-master/server/target/release/deps/libnoise-fd98b6b03b87e2a9.rlib -L ../nanomsg-0.6-beta/.libs`
Compiling playform-server v0.0.0 (file:///home/sideburnetic/playform-master/server)
Running `rustc src/mod.rs --crate-name server --crate-type bin -C opt-level=3 --out-dir /home/sideburnetic/playform-master/server/target/release --emit=dep-info,link -L dependency=/home/sideburnetic/playform-master/server/target/release -L dependency=/home/sideburnetic/playform-master/server/target/release/deps --extern terrain=/home/sideburnetic/playform-master/server/target/release/deps/libterrain-ecf0a73df2c769ad.rlib --extern env_logger=/home/sideburnetic/playform-master/server/target/release/deps/libenv_logger-9877a407b506c549.rlib --extern rand=/home/sideburnetic/playform-master/server/target/release/deps/librand-bdfcc55d3466feb3.rlib --extern thread_scoped=/home/sideburnetic/playform-master/server/target/release/deps/libthread_scoped-4f5601ef3885bb5a.rlib --extern voxel_data=/home/sideburnetic/playform-master/server/target/release/deps/libvoxel_data-4be79e0adc3fccbf.rlib --extern common=/home/sideburnetic/playform-master/server/target/release/deps/libcommon-c5bacb62f0b2fc49.rlib --extern noise=/home/sideburnetic/playform-master/server/target/release/deps/libnoise-fd98b6b03b87e2a9.rlib --extern log=/home/sideburnetic/playform-master/server/target/release/deps/liblog-f18a3e885170bd3f.rlib --extern clippy=/home/sideburnetic/playform-master/server/target/release/deps/libclippy-eaf07b4b6054fb62.so --extern nanomsg=/home/sideburnetic/playform-master/server/target/release/deps/libnanomsg-233840efd74a5eea.rlib --extern cgmath=/home/sideburnetic/playform-master/server/target/release/deps/libcgmath-f3e1b3f5127cefaf.rlib --extern time=/home/sideburnetic/playform-master/server/target/release/deps/libtime-60470bfe19faf27e.rlib --extern stopwatch=/home/sideburnetic/playform-master/server/target/release/deps/libstopwatch-a300f3c25a2f3a5d.rlib --extern num=/home/sideburnetic/playform-master/server/target/release/deps/libnum-397f282c1d72fe58.rlib -L ../nanomsg-0.6-beta/.libs`
src/main.rs:44:21: 44:38 error: Consider using an AtomicBool instead of a Mutex here. If you just want the locking behaviour and not the internal type, consider using Mutex<()>., #[deny(mutex_atomic)] on by default
src/main.rs:44 let quit_signal = Mutex::new(false);
^~~~~~~~~~~~~~~~~
src/main.rs:44:21: 44:38 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#mutex_atomic
src/main.rs:52:24: 52:35 error: Consider using an AtomicBool instead of a Mutex here. If you just want the locking behaviour and not the internal type, consider using Mutex<()>., #[deny(mutex_atomic)] on by default
src/main.rs:52 let quit_signal = &quit_signal;
^~~~~~~~~~~
src/main.rs:52:24: 52:35 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#mutex_atomic
src/main.rs:69:24: 69:35 error: Consider using an AtomicBool instead of a Mutex here. If you just want the locking behaviour and not the internal type, consider using Mutex<()>., #[deny(mutex_atomic)] on by default
src/main.rs:69 let quit_signal = &quit_signal;
^~~~~~~~~~~
src/main.rs:69:24: 69:35 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#mutex_atomic
src/main.rs:84:24: 84:35 error: Consider using an AtomicBool instead of a Mutex here. If you just want the locking behaviour and not the internal type, consider using Mutex<()>., #[deny(mutex_atomic)] on by default
src/main.rs:84 let quit_signal = &quit_signal;
^~~~~~~~~~~
src/main.rs:84:24: 84:35 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#mutex_atomic
src/octree.rs:156:9: 156:25 error: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. Consider changing the type to `&[...]`, #[deny(ptr_arg)] on by default
src/octree.rs:156 vs: &LeafContents<V>
^~~~~~~~~~~~~~~~
src/octree.rs:156:9: 156:25 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#ptr_arg
error: aborting due to 5 previous errors
Could not compile `playform-server`.
Caused by:
Process didn't exit successfully: `rustc src/mod.rs --crate-name server --crate-type bin -C opt-level=3 --out-dir /home/sideburnetic/playform-master/server/target/release --emit=dep-info,link -L dependency=/home/sideburnetic/playform-master/server/target/release -L dependency=/home/sideburnetic/playform-master/server/target/release/deps --extern terrain=/home/sideburnetic/playform-master/server/target/release/deps/libterrain-ecf0a73df2c769ad.rlib --extern env_logger=/home/sideburnetic/playform-master/server/target/release/deps/libenv_logger-9877a407b506c549.rlib --extern rand=/home/sideburnetic/playform-master/server/target/release/deps/librand-bdfcc55d3466feb3.rlib --extern thread_scoped=/home/sideburnetic/playform-master/server/target/release/deps/libthread_scoped-4f5601ef3885bb5a.rlib --extern voxel_data=/home/sideburnetic/playform-master/server/target/release/deps/libvoxel_data-4be79e0adc3fccbf.rlib --extern common=/home/sideburnetic/playform-master/server/target/release/deps/libcommon-c5bacb62f0b2fc49.rlib --extern noise=/home/sideburnetic/playform-master/server/target/release/deps/libnoise-fd98b6b03b87e2a9.rlib --extern log=/home/sideburnetic/playform-master/server/target/release/deps/liblog-f18a3e885170bd3f.rlib --extern clippy=/home/sideburnetic/playform-master/server/target/release/deps/libclippy-eaf07b4b6054fb62.so --extern nanomsg=/home/sideburnetic/playform-master/server/target/release/deps/libnanomsg-233840efd74a5eea.rlib --extern cgmath=/home/sideburnetic/playform-master/server/target/release/deps/libcgmath-f3e1b3f5127cefaf.rlib --extern time=/home/sideburnetic/playform-master/server/target/release/deps/libtime-60470bfe19faf27e.rlib --extern stopwatch=/home/sideburnetic/playform-master/server/target/release/deps/libstopwatch-a300f3c25a2f3a5d.rlib --extern num=/home/sideburnetic/playform-master/server/target/release/deps/libnum-397f282c1d72fe58.rlib -L ../nanomsg-0.6-beta/.libs` (exit code: 101)
bfops commented
Ah thanks for the report - I haven't updated in a while because clippy was out of date. I'll take a look at this in an hour or two.
The README specifies a particular nightly for this exact reason though - later versions break on a super regular basis, and often because a dependency is out of date. You can update to a particular rustc with rustup.sh --channel=nightly --date=YYYY-MM-DD
.
0joshuaolson1 commented
Sweet and thanks for the help!