[INFO] crate find-file 2.0.0 is already in cache [INFO] extracting crate find-file 2.0.0 into work/ex/clippy-test-run/sources/stable/reg/find-file/2.0.0 [INFO] extracting crate find-file 2.0.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/find-file/2.0.0 [INFO] validating manifest of find-file-2.0.0 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 find-file-2.0.0 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 find-file-2.0.0 [INFO] finished frobbing find-file-2.0.0 [INFO] frobbed toml for find-file-2.0.0 written to work/ex/clippy-test-run/sources/stable/reg/find-file/2.0.0/Cargo.toml [INFO] started frobbing find-file-2.0.0 [INFO] finished frobbing find-file-2.0.0 [INFO] frobbed toml for find-file-2.0.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/find-file/2.0.0/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 find-file-2.0.0 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/find-file/2.0.0:/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] b4e488225187595e4f55ac0f566d290b6aa5f5d6028acb5e4c6142e916781e32 [INFO] running `"docker" "start" "-a" "b4e488225187595e4f55ac0f566d290b6aa5f5d6028acb5e4c6142e916781e32"` [INFO] [stderr] Checking find-file v2.0.0 (/opt/crater/workdir) [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/bin/find_file.rs:67:26 [INFO] [stderr] | [INFO] [stderr] 67 | const FILENAME: &'static str = "foobar.sh"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/bin/select_file.rs:121:13 [INFO] [stderr] | [INFO] [stderr] 121 | return Ok(buf_len); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `Ok(buf_len)` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/bin/select_file.rs:19:14 [INFO] [stderr] | [INFO] [stderr] 19 | options: &Vec, [INFO] [stderr] | ^^^^^^^ help: change this to: `&[T]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: you should use the `starts_with` method [INFO] [stderr] --> src/bin/select_file.rs:51:16 [INFO] [stderr] | [INFO] [stderr] 51 | if response.chars().next() == Some('q') { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `response.starts_with('q')` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::chars_next_cmp)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp [INFO] [stderr] [INFO] [stderr] warning: use of `write!(stdout(), ...).unwrap()`. Consider using `print!` instead [INFO] [stderr] --> src/bin/select_file.rs:86:17 [INFO] [stderr] | [INFO] [stderr] 86 | write!(io::stdout(), "{}", options[index]).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::explicit_write)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_write [INFO] [stderr] [INFO] [stderr] error: this .into_iter() call is equivalent to .iter() and will not move the array [INFO] [stderr] --> src/bin/find_file.rs:103:58 [INFO] [stderr] | [INFO] [stderr] 103 | for dirname in [".", "upper", "middle", "lower"].into_iter() { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::into_iter_on_array)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_array [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `find-file`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/bin/select_file.rs:19:14 [INFO] [stderr] | [INFO] [stderr] 19 | options: &Vec, [INFO] [stderr] | ^^^^^^^ help: change this to: `&[T]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: you should use the `starts_with` method [INFO] [stderr] --> src/bin/select_file.rs:51:16 [INFO] [stderr] | [INFO] [stderr] 51 | if response.chars().next() == Some('q') { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `response.starts_with('q')` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::chars_next_cmp)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp [INFO] [stderr] [INFO] [stderr] warning: use of `write!(stdout(), ...).unwrap()`. Consider using `print!` instead [INFO] [stderr] --> src/bin/select_file.rs:86:17 [INFO] [stderr] | [INFO] [stderr] 86 | write!(io::stdout(), "{}", options[index]).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::explicit_write)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_write [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/bin/select_file.rs:108:20 [INFO] [stderr] | [INFO] [stderr] 108 | fn from(s: &'a String) -> StringReader { [INFO] [stderr] | ^^^^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `buf` [INFO] [stderr] --> src/bin/select_file.rs:115:22 [INFO] [stderr] | [INFO] [stderr] 115 | for i in 0..buf_len { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_range_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 115 | for (i, ) in buf.iter_mut().enumerate().take(buf_len) { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: The function/method `select_file` doesn't need a mutable reference [INFO] [stderr] --> src/bin/select_file.rs:132:13 [INFO] [stderr] | [INFO] [stderr] 132 | &mut options, [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_mut_passed)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] error: build failed [INFO] running `"docker" "inspect" "b4e488225187595e4f55ac0f566d290b6aa5f5d6028acb5e4c6142e916781e32"` [INFO] running `"docker" "rm" "-f" "b4e488225187595e4f55ac0f566d290b6aa5f5d6028acb5e4c6142e916781e32"` [INFO] [stdout] b4e488225187595e4f55ac0f566d290b6aa5f5d6028acb5e4c6142e916781e32