[INFO] updating cached repository jleahred/indent_tokenizer [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/jleahred/indent_tokenizer [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/jleahred/indent_tokenizer" "work/ex/clippy-test-run/sources/stable/gh/jleahred/indent_tokenizer"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/jleahred/indent_tokenizer'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/jleahred/indent_tokenizer" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/jleahred/indent_tokenizer"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/jleahred/indent_tokenizer'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 10de433b6387d222ee00e79252938c529342f0b8 [INFO] sha for GitHub repo jleahred/indent_tokenizer: 10de433b6387d222ee00e79252938c529342f0b8 [INFO] validating manifest of jleahred/indent_tokenizer 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 jleahred/indent_tokenizer 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 jleahred/indent_tokenizer [INFO] finished frobbing jleahred/indent_tokenizer [INFO] frobbed toml for jleahred/indent_tokenizer written to work/ex/clippy-test-run/sources/stable/gh/jleahred/indent_tokenizer/Cargo.toml [INFO] started frobbing jleahred/indent_tokenizer [INFO] finished frobbing jleahred/indent_tokenizer [INFO] frobbed toml for jleahred/indent_tokenizer written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/jleahred/indent_tokenizer/Cargo.toml [INFO] crate jleahred/indent_tokenizer 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 jleahred/indent_tokenizer 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-7/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/jleahred/indent_tokenizer:/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] 06b2cdd5aa73fac85b353edfa4ab3fa99694ad73029300de97c6b67f737c3f21 [INFO] running `"docker" "start" "-a" "06b2cdd5aa73fac85b353edfa4ab3fa99694ad73029300de97c6b67f737c3f21"` [INFO] [stderr] Checking indent_tokenizer v0.4.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/process_line.rs:53:13 [INFO] [stderr] | [INFO] [stderr] 53 | indent: indent, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `indent` [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/process_line.rs:53:13 [INFO] [stderr] | [INFO] [stderr] 53 | indent: indent, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `indent` [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: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/impl_token.rs:148:13 [INFO] [stderr] | [INFO] [stderr] 148 | fn next(&self) -> Self { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/impl_token.rs:151:13 [INFO] [stderr] | [INFO] [stderr] 151 | fn prev(&self) -> Self { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `Token` [INFO] [stderr] --> src/impl_token.rs:158:5 [INFO] [stderr] | [INFO] [stderr] 158 | / pub fn new() -> Token { [INFO] [stderr] 159 | | Token { [INFO] [stderr] 160 | | lines: Vec::new(), [INFO] [stderr] 161 | | tokens: Vec::new(), [INFO] [stderr] 162 | | } [INFO] [stderr] 163 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default_derive)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 23 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/impl_token.rs:187:20 [INFO] [stderr] | [INFO] [stderr] 187 | if self.tokens.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.tokens.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: equality checks against false can be replaced by a negation [INFO] [stderr] --> src/impl_token.rs:218:12 [INFO] [stderr] | [INFO] [stderr] 218 | if self.new_token.is_empty() == false { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!self.new_token.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::bool_comparison)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stderr] [INFO] [stderr] warning: equality checks against false can be replaced by a negation [INFO] [stderr] --> src/process_line.rs:31:12 [INFO] [stderr] | [INFO] [stderr] 31 | if located_start_indent == false { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!located_start_indent` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stderr] [INFO] [stderr] warning: you should use the `ends_with` method [INFO] [stderr] --> src/process_line.rs:48:12 [INFO] [stderr] | [INFO] [stderr] 48 | if lresult.0.chars().last() == Some(EOL_CHAR) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `lresult.0.ends_with(EOL_CHAR)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::chars_last_cmp)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/parsing_lines.rs:114:14 [INFO] [stderr] | [INFO] [stderr] 114 | .ok_or(get_error(self.line_counter))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| get_error(self.line_counter))` [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 should consider deriving a `Default` implementation for `SLine` [INFO] [stderr] --> src/lib.rs:60:5 [INFO] [stderr] | [INFO] [stderr] 60 | / pub fn new() -> Self { [INFO] [stderr] 61 | | SLine(String::new()) [INFO] [stderr] 62 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 18 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/impl_token.rs:148:13 [INFO] [stderr] | [INFO] [stderr] 148 | fn next(&self) -> Self { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/impl_token.rs:151:13 [INFO] [stderr] | [INFO] [stderr] 151 | fn prev(&self) -> Self { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `Token` [INFO] [stderr] --> src/impl_token.rs:158:5 [INFO] [stderr] | [INFO] [stderr] 158 | / pub fn new() -> Token { [INFO] [stderr] 159 | | Token { [INFO] [stderr] 160 | | lines: Vec::new(), [INFO] [stderr] 161 | | tokens: Vec::new(), [INFO] [stderr] 162 | | } [INFO] [stderr] 163 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default_derive)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 23 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/impl_token.rs:187:20 [INFO] [stderr] | [INFO] [stderr] 187 | if self.tokens.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.tokens.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: equality checks against false can be replaced by a negation [INFO] [stderr] --> src/impl_token.rs:218:12 [INFO] [stderr] | [INFO] [stderr] 218 | if self.new_token.is_empty() == false { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!self.new_token.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::bool_comparison)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/impl_token.rs:269:13 [INFO] [stderr] | [INFO] [stderr] 269 | assert!(tokens.len() == 0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `tokens.is_empty()` [INFO] [stderr] | [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 function has a cyclomatic complexity of 27 [INFO] [stderr] --> src/impl_token.rs:523:1 [INFO] [stderr] | [INFO] [stderr] 523 | / fn add_sub_sub_sub_token() { [INFO] [stderr] 524 | | let tokens = AddTokens::new() [INFO] [stderr] 525 | | .add_line(&SLine::from("A1")) [INFO] [stderr] 526 | | .add_line(&SLine::from("A2")) [INFO] [stderr] ... | [INFO] [stderr] 573 | | assert!(tokens[1].tokens[0].tokens[1].tokens[0].lines[2] == SLine::from("BABA3")); [INFO] [stderr] 574 | | } [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: the function has a cyclomatic complexity of 33 [INFO] [stderr] --> src/impl_token.rs:616:1 [INFO] [stderr] | [INFO] [stderr] 616 | / fn add_back_token() { [INFO] [stderr] 617 | | let gen_tokens = || -> Result, String> { [INFO] [stderr] 618 | | Ok(AddTokens::new() [INFO] [stderr] 619 | | .add_line(&SLine::from("A1")) [INFO] [stderr] ... | [INFO] [stderr] 682 | | assert!(tokens[1].tokens[1].lines[1] == SLine::from("BB2")); [INFO] [stderr] 683 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [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: length comparison to zero [INFO] [stderr] --> src/impl_token.rs:649:13 [INFO] [stderr] | [INFO] [stderr] 649 | assert!(tokens[0].tokens.len() == 0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `tokens[0].tokens.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/impl_token.rs:666:13 [INFO] [stderr] | [INFO] [stderr] 666 | assert!(tokens[1].tokens[0].tokens[0].tokens.len() == 0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `tokens[1].tokens[0].tokens[0].tokens.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/impl_token.rs:674:13 [INFO] [stderr] | [INFO] [stderr] 674 | assert!(tokens[1].tokens[0].tokens[1].tokens[0].tokens.len() == 0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `tokens[1].tokens[0].tokens[1].tokens[0].tokens.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: equality checks against false can be replaced by a negation [INFO] [stderr] --> src/process_line.rs:31:12 [INFO] [stderr] | [INFO] [stderr] 31 | if located_start_indent == false { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!located_start_indent` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stderr] [INFO] [stderr] warning: you should use the `ends_with` method [INFO] [stderr] --> src/process_line.rs:48:12 [INFO] [stderr] | [INFO] [stderr] 48 | if lresult.0.chars().last() == Some(EOL_CHAR) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `lresult.0.ends_with(EOL_CHAR)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::chars_last_cmp)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/parsing_lines.rs:114:14 [INFO] [stderr] | [INFO] [stderr] 114 | .ok_or(get_error(self.line_counter))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| get_error(self.line_counter))` [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 should consider deriving a `Default` implementation for `SLine` [INFO] [stderr] --> src/lib.rs:60:5 [INFO] [stderr] | [INFO] [stderr] 60 | / pub fn new() -> Self { [INFO] [stderr] 61 | | SLine(String::new()) [INFO] [stderr] 62 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 18 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/tests.rs:19:13 [INFO] [stderr] | [INFO] [stderr] 19 | assert!(tokens.len() == 0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `tokens.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/tests.rs:30:13 [INFO] [stderr] | [INFO] [stderr] 30 | assert!(tokens.len() == 0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `tokens.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/tests.rs:36:13 [INFO] [stderr] | [INFO] [stderr] 36 | assert!(tokens.len() == 0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `tokens.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 0.71s [INFO] running `"docker" "inspect" "06b2cdd5aa73fac85b353edfa4ab3fa99694ad73029300de97c6b67f737c3f21"` [INFO] running `"docker" "rm" "-f" "06b2cdd5aa73fac85b353edfa4ab3fa99694ad73029300de97c6b67f737c3f21"` [INFO] [stdout] 06b2cdd5aa73fac85b353edfa4ab3fa99694ad73029300de97c6b67f737c3f21