[INFO] crate git-absorb 0.3.0 is already in cache [INFO] extracting crate git-absorb 0.3.0 into work/ex/clippy-test-run/sources/stable/reg/git-absorb/0.3.0 [INFO] extracting crate git-absorb 0.3.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/git-absorb/0.3.0 [INFO] validating manifest of git-absorb-0.3.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 git-absorb-0.3.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 git-absorb-0.3.0 [INFO] finished frobbing git-absorb-0.3.0 [INFO] frobbed toml for git-absorb-0.3.0 written to work/ex/clippy-test-run/sources/stable/reg/git-absorb/0.3.0/Cargo.toml [INFO] started frobbing git-absorb-0.3.0 [INFO] finished frobbing git-absorb-0.3.0 [INFO] frobbed toml for git-absorb-0.3.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/git-absorb/0.3.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 git-absorb-0.3.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-3/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/git-absorb/0.3.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] e25ef6862ed37a4b086217df026627924f3674acfa5d19a0f92f53eeaf9a5cf1 [INFO] running `"docker" "start" "-a" "e25ef6862ed37a4b086217df026627924f3674acfa5d19a0f92f53eeaf9a5cf1"` [INFO] [stderr] Checking slog v2.1.1 [INFO] [stderr] Compiling libgit2-sys v0.7.11 [INFO] [stderr] Checking memchr v2.0.2 [INFO] [stderr] Checking clap v2.30.0 [INFO] [stderr] Checking slog-term v2.3.0 [INFO] [stderr] Checking slog-async v2.2.0 [INFO] [stderr] Checking git2 v0.7.5 [INFO] [stderr] Checking git-absorb v0.3.0 (/opt/crater/workdir) [INFO] [stderr] warning: method is never used: `by_old` [INFO] [stderr] --> src/owned.rs:44:5 [INFO] [stderr] | [INFO] [stderr] 44 | pub fn by_old(&self, path: &[u8]) -> Option<&Patch> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] error: this `if` has identical blocks [INFO] [stderr] --> src/commute.rs:47:13 [INFO] [stderr] | [INFO] [stderr] 47 | / { [INFO] [stderr] 48 | | // TODO: added start positions probably need to be [INFO] [stderr] 49 | | // tweaked here [INFO] [stderr] 50 | | return Some((second.clone(), first.clone())); [INFO] [stderr] 51 | | } [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/commute.rs:41:13 [INFO] [stderr] | [INFO] [stderr] 41 | / { [INFO] [stderr] 42 | | // TODO: removed start positions probably need to be [INFO] [stderr] 43 | | // tweaked here [INFO] [stderr] 44 | | return Some((second.clone(), first.clone())); [INFO] [stderr] 45 | | } else if first.removed.lines.is_empty() && second.removed.lines.is_empty() [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: the function has a cyclomatic complexity of 27 [INFO] [stderr] --> src/lib.rs:20:1 [INFO] [stderr] | [INFO] [stderr] 20 | / pub fn run(config: &Config) -> Result<(), failure::Error> { [INFO] [stderr] 21 | | let repo = git2::Repository::open_from_env()?; [INFO] [stderr] 22 | | debug!(config.logger, "repository found"; "path" => repo.path().to_str()); [INFO] [stderr] 23 | | [INFO] [stderr] ... | [INFO] [stderr] 178 | | Ok(()) [INFO] [stderr] 179 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] warning: method is never used: `by_old` [INFO] [stderr] --> src/owned.rs:44:5 [INFO] [stderr] | [INFO] [stderr] 44 | pub fn by_old(&self, path: &[u8]) -> Option<&Patch> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/lib.rs:190:57 [INFO] [stderr] | [INFO] [stderr] 190 | if let Some(slash) = path.iter().position(|&x| x == '/' as u8) { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::char_lit_as_u8)] on by default [INFO] [stderr] = help: Consider using a byte literal instead: [INFO] [stderr] b'/' [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/lib.rs:253:10 [INFO] [stderr] | [INFO] [stderr] 253 | .unwrap_or(haystack.len()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| haystack.len())` [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: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)` [INFO] [stderr] --> src/lib.rs:248:5 [INFO] [stderr] | [INFO] [stderr] 248 | / memchr::Memchr::new(needle, haystack) [INFO] [stderr] 249 | | .fuse() [INFO] [stderr] 250 | | .skip(n - 1) [INFO] [stderr] 251 | | .next() [INFO] [stderr] | |_______________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::iter_skip_next)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: this `if` has identical blocks [INFO] [stderr] --> src/commute.rs:47:13 [INFO] [stderr] | [INFO] [stderr] 47 | / { [INFO] [stderr] 48 | | // TODO: added start positions probably need to be [INFO] [stderr] 49 | | // tweaked here [INFO] [stderr] 50 | | return Some((second.clone(), first.clone())); [INFO] [stderr] 51 | | } [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/commute.rs:41:13 [INFO] [stderr] | [INFO] [stderr] 41 | / { [INFO] [stderr] 42 | | // TODO: removed start positions probably need to be [INFO] [stderr] 43 | | // tweaked here [INFO] [stderr] 44 | | return Some((second.clone(), first.clone())); [INFO] [stderr] 45 | | } else if first.removed.lines.is_empty() && second.removed.lines.is_empty() [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] error: Could not compile `git-absorb`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: the function has a cyclomatic complexity of 27 [INFO] [stderr] --> src/lib.rs:20:1 [INFO] [stderr] | [INFO] [stderr] 20 | / pub fn run(config: &Config) -> Result<(), failure::Error> { [INFO] [stderr] 21 | | let repo = git2::Repository::open_from_env()?; [INFO] [stderr] 22 | | debug!(config.logger, "repository found"; "path" => repo.path().to_str()); [INFO] [stderr] 23 | | [INFO] [stderr] ... | [INFO] [stderr] 178 | | Ok(()) [INFO] [stderr] 179 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] warning: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/lib.rs:190:57 [INFO] [stderr] | [INFO] [stderr] 190 | if let Some(slash) = path.iter().position(|&x| x == '/' as u8) { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::char_lit_as_u8)] on by default [INFO] [stderr] = help: Consider using a byte literal instead: [INFO] [stderr] b'/' [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/lib.rs:253:10 [INFO] [stderr] | [INFO] [stderr] 253 | .unwrap_or(haystack.len()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| haystack.len())` [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: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)` [INFO] [stderr] --> src/lib.rs:248:5 [INFO] [stderr] | [INFO] [stderr] 248 | / memchr::Memchr::new(needle, haystack) [INFO] [stderr] 249 | | .fuse() [INFO] [stderr] 250 | | .skip(n - 1) [INFO] [stderr] 251 | | .next() [INFO] [stderr] | |_______________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::iter_skip_next)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `git-absorb`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "e25ef6862ed37a4b086217df026627924f3674acfa5d19a0f92f53eeaf9a5cf1"` [INFO] running `"docker" "rm" "-f" "e25ef6862ed37a4b086217df026627924f3674acfa5d19a0f92f53eeaf9a5cf1"` [INFO] [stdout] e25ef6862ed37a4b086217df026627924f3674acfa5d19a0f92f53eeaf9a5cf1