[INFO] updating cached repository wjlroe/elmdoc [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/wjlroe/elmdoc [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/wjlroe/elmdoc" "work/ex/clippy-test-run/sources/stable/gh/wjlroe/elmdoc"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/wjlroe/elmdoc'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/wjlroe/elmdoc" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/wjlroe/elmdoc"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/wjlroe/elmdoc'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] f2c81f694cd5140c4fae48acb198fc167495a4b2 [INFO] sha for GitHub repo wjlroe/elmdoc: f2c81f694cd5140c4fae48acb198fc167495a4b2 [INFO] validating manifest of wjlroe/elmdoc 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 wjlroe/elmdoc 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 wjlroe/elmdoc [INFO] finished frobbing wjlroe/elmdoc [INFO] frobbed toml for wjlroe/elmdoc written to work/ex/clippy-test-run/sources/stable/gh/wjlroe/elmdoc/Cargo.toml [INFO] started frobbing wjlroe/elmdoc [INFO] finished frobbing wjlroe/elmdoc [INFO] frobbed toml for wjlroe/elmdoc written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/wjlroe/elmdoc/Cargo.toml [INFO] crate wjlroe/elmdoc has a lockfile. skipping [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] [stderr] Blocking waiting for file lock on the registry index [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting wjlroe/elmdoc against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-4/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/wjlroe/elmdoc:/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] 2e0e56eaee700c2fd7c3b1a41899a99327fb190913aad1e65d6dc6f93ad0b8b4 [INFO] running `"docker" "start" "-a" "2e0e56eaee700c2fd7c3b1a41899a99327fb190913aad1e65d6dc6f93ad0b8b4"` [INFO] [stderr] Checking serde v1.0.8 [INFO] [stderr] Checking term v0.4.5 [INFO] [stderr] Checking serde_json v1.0.2 [INFO] [stderr] Checking elmdoc v0.1.3 (/opt/crater/workdir) [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/main.rs:36:5 [INFO] [stderr] | [INFO] [stderr] 36 | write!(out, "\n").unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::write_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/main.rs:42:5 [INFO] [stderr] | [INFO] [stderr] 42 | write!(out, "\n").unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/main.rs:36:5 [INFO] [stderr] | [INFO] [stderr] 36 | write!(out, "\n").unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::write_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/main.rs:42:5 [INFO] [stderr] | [INFO] [stderr] 42 | write!(out, "\n").unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: this `else { if .. }` block can be collapsed [INFO] [stderr] --> src/main.rs:17:20 [INFO] [stderr] | [INFO] [stderr] 17 | } else { [INFO] [stderr] | ____________________^ [INFO] [stderr] 18 | | if let Some(filename) = path.file_name().and_then( [INFO] [stderr] 19 | | |name| name.to_str(), [INFO] [stderr] 20 | | ) [INFO] [stderr] ... | [INFO] [stderr] 25 | | } [INFO] [stderr] 26 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 17 | } else if let Some(filename) = path.file_name().and_then( [INFO] [stderr] 18 | |name| name.to_str(), [INFO] [stderr] 19 | ) [INFO] [stderr] 20 | { [INFO] [stderr] 21 | if filename == "documentation.json" { [INFO] [stderr] 22 | cb(&path); [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: this `else { if .. }` block can be collapsed [INFO] [stderr] --> src/main.rs:17:20 [INFO] [stderr] | [INFO] [stderr] 17 | } else { [INFO] [stderr] | ____________________^ [INFO] [stderr] 18 | | if let Some(filename) = path.file_name().and_then( [INFO] [stderr] 19 | | |name| name.to_str(), [INFO] [stderr] 20 | | ) [INFO] [stderr] ... | [INFO] [stderr] 25 | | } [INFO] [stderr] 26 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 17 | } else if let Some(filename) = path.file_name().and_then( [INFO] [stderr] 18 | |name| name.to_str(), [INFO] [stderr] 19 | ) [INFO] [stderr] 20 | { [INFO] [stderr] 21 | if filename == "documentation.json" { [INFO] [stderr] 22 | cb(&path); [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] error: this `if` has identical blocks [INFO] [stderr] --> src/main.rs:87:13 [INFO] [stderr] | [INFO] [stderr] 87 | / { [INFO] [stderr] 88 | | vec![haystack] [INFO] [stderr] 89 | | } else { [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::if_same_then_else)] on by default [INFO] [stderr] note: same as this [INFO] [stderr] --> src/main.rs:82:13 [INFO] [stderr] | [INFO] [stderr] 82 | / { [INFO] [stderr] 83 | | vec![haystack] [INFO] [stderr] 84 | | } else if hay_map.get("type").cloned().and_then(|typen| { [INFO] [stderr] | |_____________^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/main.rs:84:69 [INFO] [stderr] | [INFO] [stderr] 84 | } else if hay_map.get("type").cloned().and_then(|typen| { [INFO] [stderr] | _____________________________________________________________________^ [INFO] [stderr] 85 | | typen.as_str().map(|types| types.contains(search)) [INFO] [stderr] 86 | | }) == Some(true) [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::block_in_if_condition_stmt)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:134:42 [INFO] [stderr] | [INFO] [stderr] 134 | doc_name_from_path(doc_path).unwrap_or(String::from("unknown")); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| String::from("unknown"))` [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] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `elmdoc`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: this `if` has identical blocks [INFO] [stderr] --> src/main.rs:87:13 [INFO] [stderr] | [INFO] [stderr] 87 | / { [INFO] [stderr] 88 | | vec![haystack] [INFO] [stderr] 89 | | } else { [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::if_same_then_else)] on by default [INFO] [stderr] note: same as this [INFO] [stderr] --> src/main.rs:82:13 [INFO] [stderr] | [INFO] [stderr] 82 | / { [INFO] [stderr] 83 | | vec![haystack] [INFO] [stderr] 84 | | } else if hay_map.get("type").cloned().and_then(|typen| { [INFO] [stderr] | |_____________^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/main.rs:84:69 [INFO] [stderr] | [INFO] [stderr] 84 | } else if hay_map.get("type").cloned().and_then(|typen| { [INFO] [stderr] | _____________________________________________________________________^ [INFO] [stderr] 85 | | typen.as_str().map(|types| types.contains(search)) [INFO] [stderr] 86 | | }) == Some(true) [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::block_in_if_condition_stmt)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:134:42 [INFO] [stderr] | [INFO] [stderr] 134 | doc_name_from_path(doc_path).unwrap_or(String::from("unknown")); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| String::from("unknown"))` [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] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `elmdoc`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "2e0e56eaee700c2fd7c3b1a41899a99327fb190913aad1e65d6dc6f93ad0b8b4"` [INFO] running `"docker" "rm" "-f" "2e0e56eaee700c2fd7c3b1a41899a99327fb190913aad1e65d6dc6f93ad0b8b4"` [INFO] [stdout] 2e0e56eaee700c2fd7c3b1a41899a99327fb190913aad1e65d6dc6f93ad0b8b4