[INFO] crate cargo-dinghy 0.3.5 is already in cache [INFO] extracting crate cargo-dinghy 0.3.5 into work/ex/clippy-test-run/sources/stable/reg/cargo-dinghy/0.3.5 [INFO] extracting crate cargo-dinghy 0.3.5 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/cargo-dinghy/0.3.5 [INFO] validating manifest of cargo-dinghy-0.3.5 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 cargo-dinghy-0.3.5 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 cargo-dinghy-0.3.5 [INFO] finished frobbing cargo-dinghy-0.3.5 [INFO] frobbed toml for cargo-dinghy-0.3.5 written to work/ex/clippy-test-run/sources/stable/reg/cargo-dinghy/0.3.5/Cargo.toml [INFO] started frobbing cargo-dinghy-0.3.5 [INFO] finished frobbing cargo-dinghy-0.3.5 [INFO] frobbed toml for cargo-dinghy-0.3.5 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/cargo-dinghy/0.3.5/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 cargo-dinghy-0.3.5 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-5/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/cargo-dinghy/0.3.5:/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] 803f2801bd748d7ebb3185564a8b5cf79bf034dfc05d6995f93f5b6a1558deb3 [INFO] running `"docker" "start" "-a" "803f2801bd748d7ebb3185564a8b5cf79bf034dfc05d6995f93f5b6a1558deb3"` [INFO] [stderr] Compiling dinghy-lib v0.3.5 [INFO] [stderr] Checking cargo-dinghy v0.3.5 (/opt/crater/workdir) [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/cli.rs:368:10 [INFO] [stderr] | [INFO] [stderr] 368 | .unwrap_or(vec![]) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| vec![])` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/main.rs:51:9 [INFO] [stderr] | [INFO] [stderr] 51 | / match e.kind() { [INFO] [stderr] 52 | | &ErrorKind::PackagesCannotBeCompiledForPlatform(_) => { [INFO] [stderr] 53 | | error!("{}", e.display_chain()); [INFO] [stderr] 54 | | std::process::exit(3) [INFO] [stderr] ... | [INFO] [stderr] 64 | | } [INFO] [stderr] 65 | | }; [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 51 | match *e.kind() { [INFO] [stderr] 52 | ErrorKind::PackagesCannotBeCompiledForPlatform(_) => { [INFO] [stderr] 53 | error!("{}", e.display_chain()); [INFO] [stderr] 54 | std::process::exit(3) [INFO] [stderr] 55 | } [INFO] [stderr] 56 | ErrorKind::Cargo(ref cargo) => { [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/main.rs:57:67 [INFO] [stderr] | [INFO] [stderr] 57 | error!("Cargo error: {}", cargo.to_string().split("\n").next().unwrap_or("")); [INFO] [stderr] | ^^^^ help: try using a char instead: `'\n'` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:162:84 [INFO] [stderr] | [INFO] [stderr] 162 | println!("* {} {}", pf.id(), pf.rustc_triple().map(|s| format!("({})", s)).unwrap_or("".to_string())); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/main.rs:187:60 [INFO] [stderr] | [INFO] [stderr] 187 | dinghy: &Dinghy) -> Result<(Arc>, Option>>)> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::type_complexity)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/main.rs:191:14 [INFO] [stderr] | [INFO] [stderr] 191 | .ok_or(format!("No '{}' platform found", platform_name))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("No '{}' platform found", platform_name))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [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/main.rs:193:22 [INFO] [stderr] | [INFO] [stderr] 193 | let device = dinghy.devices() [INFO] [stderr] | ______________________^ [INFO] [stderr] 194 | | .into_iter() [INFO] [stderr] 195 | | .filter(|device| matches.value_of("DEVICE") [INFO] [stderr] 196 | | .map(|filter| format!("{}", device).to_lowercase().contains(&filter.to_lowercase())) [INFO] [stderr] 197 | | .unwrap_or(true)) [INFO] [stderr] 198 | | .filter(|it| platform.is_compatible_with(&**it.as_ref())) [INFO] [stderr] 199 | | .next(); [INFO] [stderr] | |___________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::filter_next)] on by default [INFO] [stderr] = note: replace `filter(|it| platform.is_compatible_with(&**it.as_ref())).next()` with `find(|it| platform.is_compatible_with(&**it.as_ref()))` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/main.rs:207:12 [INFO] [stderr] | [INFO] [stderr] 207 | if devices.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `devices.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/main.rs:216:10 [INFO] [stderr] | [INFO] [stderr] 216 | .ok_or(format!("No device and platform combination found for device hint `{}'", device_filter).into()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("No device and platform combination found for device hint `{}'", device_filter).into())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/cli.rs:368:10 [INFO] [stderr] | [INFO] [stderr] 368 | .unwrap_or(vec![]) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| vec![])` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/main.rs:51:9 [INFO] [stderr] | [INFO] [stderr] 51 | / match e.kind() { [INFO] [stderr] 52 | | &ErrorKind::PackagesCannotBeCompiledForPlatform(_) => { [INFO] [stderr] 53 | | error!("{}", e.display_chain()); [INFO] [stderr] 54 | | std::process::exit(3) [INFO] [stderr] ... | [INFO] [stderr] 64 | | } [INFO] [stderr] 65 | | }; [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 51 | match *e.kind() { [INFO] [stderr] 52 | ErrorKind::PackagesCannotBeCompiledForPlatform(_) => { [INFO] [stderr] 53 | error!("{}", e.display_chain()); [INFO] [stderr] 54 | std::process::exit(3) [INFO] [stderr] 55 | } [INFO] [stderr] 56 | ErrorKind::Cargo(ref cargo) => { [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/main.rs:57:67 [INFO] [stderr] | [INFO] [stderr] 57 | error!("Cargo error: {}", cargo.to_string().split("\n").next().unwrap_or("")); [INFO] [stderr] | ^^^^ help: try using a char instead: `'\n'` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:162:84 [INFO] [stderr] | [INFO] [stderr] 162 | println!("* {} {}", pf.id(), pf.rustc_triple().map(|s| format!("({})", s)).unwrap_or("".to_string())); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/main.rs:187:60 [INFO] [stderr] | [INFO] [stderr] 187 | dinghy: &Dinghy) -> Result<(Arc>, Option>>)> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::type_complexity)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/main.rs:191:14 [INFO] [stderr] | [INFO] [stderr] 191 | .ok_or(format!("No '{}' platform found", platform_name))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("No '{}' platform found", platform_name))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [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/main.rs:193:22 [INFO] [stderr] | [INFO] [stderr] 193 | let device = dinghy.devices() [INFO] [stderr] | ______________________^ [INFO] [stderr] 194 | | .into_iter() [INFO] [stderr] 195 | | .filter(|device| matches.value_of("DEVICE") [INFO] [stderr] 196 | | .map(|filter| format!("{}", device).to_lowercase().contains(&filter.to_lowercase())) [INFO] [stderr] 197 | | .unwrap_or(true)) [INFO] [stderr] 198 | | .filter(|it| platform.is_compatible_with(&**it.as_ref())) [INFO] [stderr] 199 | | .next(); [INFO] [stderr] | |___________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::filter_next)] on by default [INFO] [stderr] = note: replace `filter(|it| platform.is_compatible_with(&**it.as_ref())).next()` with `find(|it| platform.is_compatible_with(&**it.as_ref()))` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/main.rs:207:12 [INFO] [stderr] | [INFO] [stderr] 207 | if devices.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `devices.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: use of `ok_or` followed by a function call [INFO] [stderr] --> src/main.rs:216:10 [INFO] [stderr] | [INFO] [stderr] 216 | .ok_or(format!("No device and platform combination found for device hint `{}'", device_filter).into()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("No device and platform combination found for device hint `{}'", device_filter).into())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 24.87s [INFO] running `"docker" "inspect" "803f2801bd748d7ebb3185564a8b5cf79bf034dfc05d6995f93f5b6a1558deb3"` [INFO] running `"docker" "rm" "-f" "803f2801bd748d7ebb3185564a8b5cf79bf034dfc05d6995f93f5b6a1558deb3"` [INFO] [stdout] 803f2801bd748d7ebb3185564a8b5cf79bf034dfc05d6995f93f5b6a1558deb3