[INFO] crate input-linux 0.0.1 is already in cache [INFO] extracting crate input-linux 0.0.1 into work/ex/clippy-test-run/sources/stable/reg/input-linux/0.0.1 [INFO] extracting crate input-linux 0.0.1 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/input-linux/0.0.1 [INFO] validating manifest of input-linux-0.0.1 on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of input-linux-0.0.1 on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing input-linux-0.0.1 [INFO] finished frobbing input-linux-0.0.1 [INFO] frobbed toml for input-linux-0.0.1 written to work/ex/clippy-test-run/sources/stable/reg/input-linux/0.0.1/Cargo.toml [INFO] started frobbing input-linux-0.0.1 [INFO] finished frobbing input-linux-0.0.1 [INFO] frobbed toml for input-linux-0.0.1 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/input-linux/0.0.1/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting input-linux-0.0.1 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-2/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/input-linux/0.0.1:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] 325b3e8932a9cdade79496ed5c9483bf29f1bffa7fe0737d20fe79efcd3e0093 [INFO] running `"docker" "start" "-a" "325b3e8932a9cdade79496ed5c9483bf29f1bffa7fe0737d20fe79efcd3e0093"` [INFO] [stderr] Checking input-linux-sys v0.3.1 [INFO] [stderr] Checking input-linux v0.0.1 (/opt/crater/workdir) [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/kinds.rs:357:18 [INFO] [stderr] | [INFO] [stderr] 357 | _ => return Err(Default::default()), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `Err(Default::default())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/kinds.rs:357:18 [INFO] [stderr] | [INFO] [stderr] 357 | _ => return Err(Default::default()), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `Err(Default::default())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/kinds.rs:362:18 [INFO] [stderr] | [INFO] [stderr] 362 | pub fn count(&self) -> Result { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/kinds.rs:381:23 [INFO] [stderr] | [INFO] [stderr] 381 | pub fn count_bits(&self) -> Result { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/kinds.rs:362:18 [INFO] [stderr] | [INFO] [stderr] 362 | pub fn count(&self) -> Result { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/kinds.rs:381:23 [INFO] [stderr] | [INFO] [stderr] 381 | pub fn count_bits(&self) -> Result { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/keys.rs:1004:22 [INFO] [stderr] | [INFO] [stderr] 1004 | pub fn is_button(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/keys.rs:1009:19 [INFO] [stderr] | [INFO] [stderr] 1009 | pub fn is_key(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: casting i16 to i32 may become silently lossy if types change [INFO] [stderr] --> src/macros.rs:151:34 [INFO] [stderr] | [INFO] [stderr] 151 | sys::$ev(self.0, value as _) [INFO] [stderr] | ^^^^^^^^^^ help: try: `i32::from(value)` [INFO] [stderr] | [INFO] [stderr] ::: src/evdev.rs:37:5 [INFO] [stderr] | [INFO] [stderr] 37 | / ioctl_impl! { [INFO] [stderr] 38 | | { [INFO] [stderr] 39 | | /// `EVIOCGVERSION` [INFO] [stderr] 40 | | @get driver_version = ev_get_version -> i32 [INFO] [stderr] ... | [INFO] [stderr] 113 | | } [INFO] [stderr] 114 | | } [INFO] [stderr] | |_____- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/uinput.rs:48:37 [INFO] [stderr] | [INFO] [stderr] 48 | pub fn create_legacy(&self, id: &InputId, name: &[u8], ff_effects_max: u32, abs: &[AbsoluteInfoSetup]) -> io::Result<()> { [INFO] [stderr] | ^^^^^^^^ help: consider passing by value instead: `InputId` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/uinput.rs:75:30 [INFO] [stderr] | [INFO] [stderr] 75 | pub fn create(&self, id: &InputId, name: &[u8], ff_effects_max: u32, abs: &[AbsoluteInfoSetup]) -> io::Result<()> { [INFO] [stderr] | ^^^^^^^^ help: consider passing by value instead: `InputId` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: called `filter(p).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(p)` instead. [INFO] [stderr] --> src/bitmask.rs:133:9 [INFO] [stderr] | [INFO] [stderr] 133 | self.iter.by_ref().take_while(|i| mask.index_valid(*i)).filter(|i| mask.get(*i)).next() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::filter_next)] on by default [INFO] [stderr] = note: replace `filter(|i| mask.get(*i)).next()` with `find(|i| mask.get(*i))` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:70:9 [INFO] [stderr] | [INFO] [stderr] 70 | <&InputId>::from(&id).clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*<&InputId>::from(&id)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:76:9 [INFO] [stderr] | [INFO] [stderr] 76 | <&sys::input_id>::from(&id).clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*<&sys::input_id>::from(&id)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:142:9 [INFO] [stderr] | [INFO] [stderr] 142 | <&AbsoluteInfo>::from(&info).clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*<&AbsoluteInfo>::from(&info)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:148:9 [INFO] [stderr] | [INFO] [stderr] 148 | <&sys::input_absinfo>::from(&info).clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*<&sys::input_absinfo>::from(&info)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/keys.rs:1004:22 [INFO] [stderr] | [INFO] [stderr] 1004 | pub fn is_button(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/keys.rs:1009:19 [INFO] [stderr] | [INFO] [stderr] 1009 | pub fn is_key(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: casting i16 to i32 may become silently lossy if types change [INFO] [stderr] --> src/macros.rs:151:34 [INFO] [stderr] | [INFO] [stderr] 151 | sys::$ev(self.0, value as _) [INFO] [stderr] | ^^^^^^^^^^ help: try: `i32::from(value)` [INFO] [stderr] | [INFO] [stderr] ::: src/evdev.rs:37:5 [INFO] [stderr] | [INFO] [stderr] 37 | / ioctl_impl! { [INFO] [stderr] 38 | | { [INFO] [stderr] 39 | | /// `EVIOCGVERSION` [INFO] [stderr] 40 | | @get driver_version = ev_get_version -> i32 [INFO] [stderr] ... | [INFO] [stderr] 113 | | } [INFO] [stderr] 114 | | } [INFO] [stderr] | |_____- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/uinput.rs:48:37 [INFO] [stderr] | [INFO] [stderr] 48 | pub fn create_legacy(&self, id: &InputId, name: &[u8], ff_effects_max: u32, abs: &[AbsoluteInfoSetup]) -> io::Result<()> { [INFO] [stderr] | ^^^^^^^^ help: consider passing by value instead: `InputId` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/uinput.rs:75:30 [INFO] [stderr] | [INFO] [stderr] 75 | pub fn create(&self, id: &InputId, name: &[u8], ff_effects_max: u32, abs: &[AbsoluteInfoSetup]) -> io::Result<()> { [INFO] [stderr] | ^^^^^^^^ help: consider passing by value instead: `InputId` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: called `filter(p).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(p)` instead. [INFO] [stderr] --> src/bitmask.rs:133:9 [INFO] [stderr] | [INFO] [stderr] 133 | self.iter.by_ref().take_while(|i| mask.index_valid(*i)).filter(|i| mask.get(*i)).next() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::filter_next)] on by default [INFO] [stderr] = note: replace `filter(|i| mask.get(*i)).next()` with `find(|i| mask.get(*i))` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:70:9 [INFO] [stderr] | [INFO] [stderr] 70 | <&InputId>::from(&id).clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*<&InputId>::from(&id)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:76:9 [INFO] [stderr] | [INFO] [stderr] 76 | <&sys::input_id>::from(&id).clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*<&sys::input_id>::from(&id)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:142:9 [INFO] [stderr] | [INFO] [stderr] 142 | <&AbsoluteInfo>::from(&info).clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*<&AbsoluteInfo>::from(&info)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:148:9 [INFO] [stderr] | [INFO] [stderr] 148 | <&sys::input_absinfo>::from(&info).clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*<&sys::input_absinfo>::from(&info)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 5.49s [INFO] running `"docker" "inspect" "325b3e8932a9cdade79496ed5c9483bf29f1bffa7fe0737d20fe79efcd3e0093"` [INFO] running `"docker" "rm" "-f" "325b3e8932a9cdade79496ed5c9483bf29f1bffa7fe0737d20fe79efcd3e0093"` [INFO] [stdout] 325b3e8932a9cdade79496ed5c9483bf29f1bffa7fe0737d20fe79efcd3e0093