[INFO] updating cached repository waka/sonar [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/waka/sonar [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/waka/sonar" "work/ex/clippy-test-run/sources/stable/gh/waka/sonar"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/waka/sonar'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/waka/sonar" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/waka/sonar"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/waka/sonar'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] d01e2430e9f329d1ddf832b3b5590ac97583d4c6 [INFO] sha for GitHub repo waka/sonar: d01e2430e9f329d1ddf832b3b5590ac97583d4c6 [INFO] validating manifest of waka/sonar 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 waka/sonar 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 waka/sonar [INFO] finished frobbing waka/sonar [INFO] frobbed toml for waka/sonar written to work/ex/clippy-test-run/sources/stable/gh/waka/sonar/Cargo.toml [INFO] started frobbing waka/sonar [INFO] finished frobbing waka/sonar [INFO] frobbed toml for waka/sonar written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/waka/sonar/Cargo.toml [INFO] crate waka/sonar 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 waka/sonar 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/waka/sonar:/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] 993cc5dadf5bffb647f73ffd9c1655fcda9c17d8fdb76e81183bda3bba97a52c [INFO] running `"docker" "start" "-a" "993cc5dadf5bffb647f73ffd9c1655fcda9c17d8fdb76e81183bda3bba97a52c"` [INFO] [stderr] Checking libc v0.2.16 [INFO] [stderr] Checking regex-syntax v0.3.5 [INFO] [stderr] Checking log v0.3.6 [INFO] [stderr] Checking memchr v0.1.11 [INFO] [stderr] Checking thread-id v2.0.0 [INFO] [stderr] Checking thread_local v0.2.7 [INFO] [stderr] Checking aho-corasick v0.5.3 [INFO] [stderr] Checking regex v0.1.77 [INFO] [stderr] Checking env_logger v0.3.5 [INFO] [stderr] Checking sonar v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/args.rs:18:13 [INFO] [stderr] | [INFO] [stderr] 18 | pattern: pattern, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `pattern` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/args.rs:19:13 [INFO] [stderr] | [INFO] [stderr] 19 | paths: paths, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `paths` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/args.rs:20:13 [INFO] [stderr] | [INFO] [stderr] 20 | ignore_case: ignore_case, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `ignore_case` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/args.rs:21:13 [INFO] [stderr] | [INFO] [stderr] 21 | recursive: recursive, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `recursive` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/args.rs:22:13 [INFO] [stderr] | [INFO] [stderr] 22 | regex: regex, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `regex` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/walker.rs:22:13 [INFO] [stderr] | [INFO] [stderr] 22 | recursive: recursive, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `recursive` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/args.rs:18:13 [INFO] [stderr] | [INFO] [stderr] 18 | pattern: pattern, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `pattern` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/args.rs:19:13 [INFO] [stderr] | [INFO] [stderr] 19 | paths: paths, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `paths` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/args.rs:20:13 [INFO] [stderr] | [INFO] [stderr] 20 | ignore_case: ignore_case, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `ignore_case` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/args.rs:21:13 [INFO] [stderr] | [INFO] [stderr] 21 | recursive: recursive, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `recursive` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/args.rs:22:13 [INFO] [stderr] | [INFO] [stderr] 22 | regex: regex, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `regex` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/walker.rs:22:13 [INFO] [stderr] | [INFO] [stderr] 22 | recursive: recursive, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `recursive` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/args.rs:28:9 [INFO] [stderr] | [INFO] [stderr] 28 | / match self.ignore_case { [INFO] [stderr] 29 | | true => val.to_lowercase(), [INFO] [stderr] 30 | | false => val, [INFO] [stderr] 31 | | } [INFO] [stderr] | |_________^ help: consider using an if/else expression: `if self.ignore_case { val.to_lowercase() } else { val }` [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/args.rs:28:9 [INFO] [stderr] | [INFO] [stderr] 28 | / match self.ignore_case { [INFO] [stderr] 29 | | true => val.to_lowercase(), [INFO] [stderr] 30 | | false => val, [INFO] [stderr] 31 | | } [INFO] [stderr] | |_________^ help: consider using an if/else expression: `if self.ignore_case { val.to_lowercase() } else { val }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/searcher.rs:21:31 [INFO] [stderr] | [INFO] [stderr] 21 | for line in content.split("\n") { [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: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/searcher.rs:22:9 [INFO] [stderr] | [INFO] [stderr] 22 | / match line.find(&pattern[..]) { [INFO] [stderr] 23 | | Some(_) => { [INFO] [stderr] 24 | | lines.push(line.to_string()); [INFO] [stderr] 25 | | } [INFO] [stderr] 26 | | _ => {} [INFO] [stderr] 27 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 22 | if let Some(_) = line.find(&pattern[..]) { [INFO] [stderr] 23 | lines.push(line.to_string()); [INFO] [stderr] 24 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/searcher.rs:21:31 [INFO] [stderr] | [INFO] [stderr] 21 | for line in content.split("\n") { [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: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/searcher.rs:22:9 [INFO] [stderr] | [INFO] [stderr] 22 | / match line.find(&pattern[..]) { [INFO] [stderr] 23 | | Some(_) => { [INFO] [stderr] 24 | | lines.push(line.to_string()); [INFO] [stderr] 25 | | } [INFO] [stderr] 26 | | _ => {} [INFO] [stderr] 27 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 22 | if let Some(_) = line.find(&pattern[..]) { [INFO] [stderr] 23 | lines.push(line.to_string()); [INFO] [stderr] 24 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/bin/sonar.rs:95:22 [INFO] [stderr] | [INFO] [stderr] 95 | Ok(Action::Run { args: args }) [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `args` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/bin/sonar.rs:81:32 [INFO] [stderr] | [INFO] [stderr] 81 | return Err(Error::from(format!("invalid args"))); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"invalid args".to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 8.98s [INFO] running `"docker" "inspect" "993cc5dadf5bffb647f73ffd9c1655fcda9c17d8fdb76e81183bda3bba97a52c"` [INFO] running `"docker" "rm" "-f" "993cc5dadf5bffb647f73ffd9c1655fcda9c17d8fdb76e81183bda3bba97a52c"` [INFO] [stdout] 993cc5dadf5bffb647f73ffd9c1655fcda9c17d8fdb76e81183bda3bba97a52c