[INFO] updating cached repository elynnyap/swish [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/elynnyap/swish [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/elynnyap/swish" "work/ex/clippy-test-run/sources/stable/gh/elynnyap/swish"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/elynnyap/swish'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/elynnyap/swish" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/elynnyap/swish"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/elynnyap/swish'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] e06ad6140b62bef212cd9514f1069f41e37eb4dc [INFO] sha for GitHub repo elynnyap/swish: e06ad6140b62bef212cd9514f1069f41e37eb4dc [INFO] validating manifest of elynnyap/swish 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 elynnyap/swish 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 elynnyap/swish [INFO] finished frobbing elynnyap/swish [INFO] frobbed toml for elynnyap/swish written to work/ex/clippy-test-run/sources/stable/gh/elynnyap/swish/Cargo.toml [INFO] started frobbing elynnyap/swish [INFO] finished frobbing elynnyap/swish [INFO] frobbed toml for elynnyap/swish written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/elynnyap/swish/Cargo.toml [INFO] crate elynnyap/swish has a lockfile. skipping [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 elynnyap/swish against stable+rustflags=-Dclippy::into_iter_on_array for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-5/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/elynnyap/swish:/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 -Dclippy::into_iter_on_array" "-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] 9d2c6c70c2b6a24f015453fa9e4536e2bbe6cf2d566dd7ed6f4ef74ee6e3ff47 [INFO] running `"docker" "start" "-a" "9d2c6c70c2b6a24f015453fa9e4536e2bbe6cf2d566dd7ed6f4ef74ee6e3ff47"` [INFO] [stderr] Checking nix v0.9.0 [INFO] [stderr] Checking shell v0.0.1 (/opt/crater/workdir) [INFO] [stderr] warning: methods called `is_*` usually take self by reference or no self; consider choosing a less ambiguous name [INFO] [stderr] --> src/circular_buffer.rs:29:17 [INFO] [stderr] | [INFO] [stderr] 29 | fn is_empty(&mut self) -> bool { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::wrong_self_convention)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/args_parser.rs:4:8 [INFO] [stderr] | [INFO] [stderr] 4 | if argv.len() > 0 && argv[last_index].to_lowercase() == "evanesco" { [INFO] [stderr] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!argv.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `argv` [INFO] [stderr] --> src/args_parser.rs:14:14 [INFO] [stderr] | [INFO] [stderr] 14 | for i in 0..argv.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] 14 | for (i, ) in argv.iter().enumerate() { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: methods called `is_*` usually take self by reference or no self; consider choosing a less ambiguous name [INFO] [stderr] --> src/circular_buffer.rs:29:17 [INFO] [stderr] | [INFO] [stderr] 29 | fn is_empty(&mut self) -> bool { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::wrong_self_convention)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/args_parser.rs:4:8 [INFO] [stderr] | [INFO] [stderr] 4 | if argv.len() > 0 && argv[last_index].to_lowercase() == "evanesco" { [INFO] [stderr] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!argv.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `argv` [INFO] [stderr] --> src/args_parser.rs:14:14 [INFO] [stderr] | [INFO] [stderr] 14 | for i in 0..argv.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] 14 | for (i, ) in argv.iter().enumerate() { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: handle written amount returned or use `Write::write_all` instead [INFO] [stderr] --> src/bin/main.rs:55:13 [INFO] [stderr] | [INFO] [stderr] 55 | stdout.write(self.cmd_prompt.as_bytes()).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::unused_io_amount)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount [INFO] [stderr] [INFO] [stderr] error: handle written amount returned or use `Write::write_all` instead [INFO] [stderr] --> src/bin/main.rs:75:9 [INFO] [stderr] | [INFO] [stderr] 75 | stdout.write(welcome_msg.as_bytes()).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount [INFO] [stderr] [INFO] [stderr] error: handle written amount returned or use `Write::write_all` instead [INFO] [stderr] --> src/bin/main.rs:79:13 [INFO] [stderr] | [INFO] [stderr] 79 | stdout.write(self.cmd_prompt.as_bytes()).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount [INFO] [stderr] [INFO] [stderr] warning: this `.filter_map` can be written more simply using `.filter` [INFO] [stderr] --> src/bin/main.rs:110:31 [INFO] [stderr] | [INFO] [stderr] 110 | let argv: Vec<&str> = cmd_line.split(' ').filter_map(|x| { [INFO] [stderr] | _______________________________^ [INFO] [stderr] 111 | | if x == "" { [INFO] [stderr] 112 | | None [INFO] [stderr] 113 | | } else { [INFO] [stderr] 114 | | Some(x) [INFO] [stderr] 115 | | } [INFO] [stderr] 116 | | }).collect(); [INFO] [stderr] | |__________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_filter_map)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/bin/main.rs:206:47 [INFO] [stderr] | [INFO] [stderr] 206 | let argv_cstring: Vec = argv.into_iter().map( |slice| CString::new(*slice).unwrap()).collect(); [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] error: aborting due to 3 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `shell`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: handle written amount returned or use `Write::write_all` instead [INFO] [stderr] --> src/bin/main.rs:55:13 [INFO] [stderr] | [INFO] [stderr] 55 | stdout.write(self.cmd_prompt.as_bytes()).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::unused_io_amount)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount [INFO] [stderr] [INFO] [stderr] error: handle written amount returned or use `Write::write_all` instead [INFO] [stderr] --> src/bin/main.rs:75:9 [INFO] [stderr] | [INFO] [stderr] 75 | stdout.write(welcome_msg.as_bytes()).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount [INFO] [stderr] [INFO] [stderr] error: handle written amount returned or use `Write::write_all` instead [INFO] [stderr] --> src/bin/main.rs:79:13 [INFO] [stderr] | [INFO] [stderr] 79 | stdout.write(self.cmd_prompt.as_bytes()).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount [INFO] [stderr] [INFO] [stderr] warning: this `.filter_map` can be written more simply using `.filter` [INFO] [stderr] --> src/bin/main.rs:110:31 [INFO] [stderr] | [INFO] [stderr] 110 | let argv: Vec<&str> = cmd_line.split(' ').filter_map(|x| { [INFO] [stderr] | _______________________________^ [INFO] [stderr] 111 | | if x == "" { [INFO] [stderr] 112 | | None [INFO] [stderr] 113 | | } else { [INFO] [stderr] 114 | | Some(x) [INFO] [stderr] 115 | | } [INFO] [stderr] 116 | | }).collect(); [INFO] [stderr] | |__________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_filter_map)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/bin/main.rs:206:47 [INFO] [stderr] | [INFO] [stderr] 206 | let argv_cstring: Vec = argv.into_iter().map( |slice| CString::new(*slice).unwrap()).collect(); [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] error: aborting due to 3 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `shell`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "9d2c6c70c2b6a24f015453fa9e4536e2bbe6cf2d566dd7ed6f4ef74ee6e3ff47"` [INFO] running `"docker" "rm" "-f" "9d2c6c70c2b6a24f015453fa9e4536e2bbe6cf2d566dd7ed6f4ef74ee6e3ff47"` [INFO] [stdout] 9d2c6c70c2b6a24f015453fa9e4536e2bbe6cf2d566dd7ed6f4ef74ee6e3ff47