[INFO] updating cached repository AmaranthineCodices/rust-cc [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/AmaranthineCodices/rust-cc [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/AmaranthineCodices/rust-cc" "work/ex/clippy-test-run/sources/stable/gh/AmaranthineCodices/rust-cc"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/AmaranthineCodices/rust-cc'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/AmaranthineCodices/rust-cc" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/AmaranthineCodices/rust-cc"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/AmaranthineCodices/rust-cc'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] aadbf5067e0dfab4adc806fbef40ba0dde6b67b9 [INFO] sha for GitHub repo AmaranthineCodices/rust-cc: aadbf5067e0dfab4adc806fbef40ba0dde6b67b9 [INFO] validating manifest of AmaranthineCodices/rust-cc 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 AmaranthineCodices/rust-cc 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 AmaranthineCodices/rust-cc [INFO] finished frobbing AmaranthineCodices/rust-cc [INFO] frobbed toml for AmaranthineCodices/rust-cc written to work/ex/clippy-test-run/sources/stable/gh/AmaranthineCodices/rust-cc/Cargo.toml [INFO] started frobbing AmaranthineCodices/rust-cc [INFO] finished frobbing AmaranthineCodices/rust-cc [INFO] frobbed toml for AmaranthineCodices/rust-cc written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/AmaranthineCodices/rust-cc/Cargo.toml [INFO] crate AmaranthineCodices/rust-cc 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 AmaranthineCodices/rust-cc against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-1/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/AmaranthineCodices/rust-cc:/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] f008a6cbacb7ac16a6049efa4af53d18ac99205666e4a48b8d578577657ce5dd [INFO] running `"docker" "start" "-a" "f008a6cbacb7ac16a6049efa4af53d18ac99205666e4a48b8d578577657ce5dd"` [INFO] [stderr] Checking regex v0.2.10 [INFO] [stderr] Checking rust-cc v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: variant is never constructed: `Whitespace` [INFO] [stderr] --> src/lexer.rs:11:5 [INFO] [stderr] | [INFO] [stderr] 11 | Whitespace(&'a str), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: variant is never constructed: `OpenBrace` [INFO] [stderr] --> src/lexer.rs:12:5 [INFO] [stderr] | [INFO] [stderr] 12 | OpenBrace, [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: variant is never constructed: `CloseBrace` [INFO] [stderr] --> src/lexer.rs:13:5 [INFO] [stderr] | [INFO] [stderr] 13 | CloseBrace, [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: variant is never constructed: `OpenParen` [INFO] [stderr] --> src/lexer.rs:14:5 [INFO] [stderr] | [INFO] [stderr] 14 | OpenParen, [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: variant is never constructed: `CloseParen` [INFO] [stderr] --> src/lexer.rs:15:5 [INFO] [stderr] | [INFO] [stderr] 15 | CloseParen, [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: variant is never constructed: `Semicolon` [INFO] [stderr] --> src/lexer.rs:16:5 [INFO] [stderr] | [INFO] [stderr] 16 | Semicolon, [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: variant is never constructed: `Keyword` [INFO] [stderr] --> src/lexer.rs:17:5 [INFO] [stderr] | [INFO] [stderr] 17 | Keyword(&'a str), [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: variant is never constructed: `Identifier` [INFO] [stderr] --> src/lexer.rs:18:5 [INFO] [stderr] | [INFO] [stderr] 18 | Identifier(&'a str), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: variant is never constructed: `IntLiteral` [INFO] [stderr] --> src/lexer.rs:19:5 [INFO] [stderr] | [INFO] [stderr] 19 | IntLiteral(i32), [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: enum is never used: `LexError` [INFO] [stderr] --> src/lexer.rs:30:1 [INFO] [stderr] | [INFO] [stderr] 30 | pub enum LexError { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `try_get` [INFO] [stderr] --> src/lexer.rs:47:1 [INFO] [stderr] | [INFO] [stderr] 47 | / fn try_get<'a, F>(current_input: &'a str, pattern: &Regex, transformer: F) -> Option<(&'a str, &'a str, LexemeKind<'a>)> [INFO] [stderr] 48 | | where F: Fn(&'a str) -> LexemeKind<'a>, [INFO] [stderr] 49 | | { [INFO] [stderr] 50 | | if let Some(matched_result) = pattern.find(current_input) { [INFO] [stderr] ... | [INFO] [stderr] 57 | | } [INFO] [stderr] 58 | | } [INFO] [stderr] | |_^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `convert_identifier_str` [INFO] [stderr] --> src/lexer.rs:60:1 [INFO] [stderr] | [INFO] [stderr] 60 | fn convert_identifier_str<'a>(identifier: &'a str) -> LexemeKind<'a> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `convert_symbol_str` [INFO] [stderr] --> src/lexer.rs:69:1 [INFO] [stderr] | [INFO] [stderr] 69 | fn convert_symbol_str<'a>(symbol: &'a str) -> LexemeKind<'a> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `get_next_token` [INFO] [stderr] --> src/lexer.rs:80:1 [INFO] [stderr] | [INFO] [stderr] 80 | fn get_next_token<'a>(current_input: &'a str) -> Option<(&'a str, &'a str, LexemeKind<'a>)> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `lex_str` [INFO] [stderr] --> src/lexer.rs:87:1 [INFO] [stderr] | [INFO] [stderr] 87 | pub fn lex_str(input: &str) -> Result, LexError> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lexer.rs:60:1 [INFO] [stderr] | [INFO] [stderr] 60 | / fn convert_identifier_str<'a>(identifier: &'a str) -> LexemeKind<'a> { [INFO] [stderr] 61 | | if KEYWORDS.contains(identifier) { [INFO] [stderr] 62 | | LexemeKind::Keyword(identifier) [INFO] [stderr] 63 | | } [INFO] [stderr] ... | [INFO] [stderr] 66 | | } [INFO] [stderr] 67 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lexer.rs:69:1 [INFO] [stderr] | [INFO] [stderr] 69 | / fn convert_symbol_str<'a>(symbol: &'a str) -> LexemeKind<'a> { [INFO] [stderr] 70 | | match symbol { [INFO] [stderr] 71 | | "{" => LexemeKind::OpenBrace, [INFO] [stderr] 72 | | "}" => LexemeKind::CloseBrace, [INFO] [stderr] ... | [INFO] [stderr] 77 | | } [INFO] [stderr] 78 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lexer.rs:80:1 [INFO] [stderr] | [INFO] [stderr] 80 | / fn get_next_token<'a>(current_input: &'a str) -> Option<(&'a str, &'a str, LexemeKind<'a>)> { [INFO] [stderr] 81 | | try_get(current_input, &WHITESPACE_REGEX, |s| LexemeKind::Whitespace(s)) [INFO] [stderr] 82 | | .or_else(|| try_get(current_input, &IDENTIFIER_REGEX, convert_identifier_str)) [INFO] [stderr] 83 | | .or_else(|| try_get(current_input, &SYMBOL_REGEX, convert_symbol_str)) [INFO] [stderr] 84 | | .or_else(|| try_get(current_input, &INT_LITERAL_REGEX, |s| LexemeKind::IntLiteral(s.parse().unwrap()))) [INFO] [stderr] 85 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: this loop could be written as a `while let` loop [INFO] [stderr] --> src/lexer.rs:93:5 [INFO] [stderr] | [INFO] [stderr] 93 | / loop { [INFO] [stderr] 94 | | if let Some((new_input, consumed_input, lexeme_kind)) = get_next_token(current_input) { [INFO] [stderr] 95 | | current_input = new_input; [INFO] [stderr] 96 | | [INFO] [stderr] ... | [INFO] [stderr] 129 | | } [INFO] [stderr] 130 | | } [INFO] [stderr] | |_____^ help: try: `while let Some((new_input, consumed_input, lexeme_kind)) = get_next_token(current_input) { .. }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::while_let_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/lexer.rs:109:60 [INFO] [stderr] | [INFO] [stderr] 109 | let line_change_count = consumed_input.matches("\n").count(); [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: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lexer.rs:60:1 [INFO] [stderr] | [INFO] [stderr] 60 | / fn convert_identifier_str<'a>(identifier: &'a str) -> LexemeKind<'a> { [INFO] [stderr] 61 | | if KEYWORDS.contains(identifier) { [INFO] [stderr] 62 | | LexemeKind::Keyword(identifier) [INFO] [stderr] 63 | | } [INFO] [stderr] ... | [INFO] [stderr] 66 | | } [INFO] [stderr] 67 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lexer.rs:69:1 [INFO] [stderr] | [INFO] [stderr] 69 | / fn convert_symbol_str<'a>(symbol: &'a str) -> LexemeKind<'a> { [INFO] [stderr] 70 | | match symbol { [INFO] [stderr] 71 | | "{" => LexemeKind::OpenBrace, [INFO] [stderr] 72 | | "}" => LexemeKind::CloseBrace, [INFO] [stderr] ... | [INFO] [stderr] 77 | | } [INFO] [stderr] 78 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/lexer.rs:80:1 [INFO] [stderr] | [INFO] [stderr] 80 | / fn get_next_token<'a>(current_input: &'a str) -> Option<(&'a str, &'a str, LexemeKind<'a>)> { [INFO] [stderr] 81 | | try_get(current_input, &WHITESPACE_REGEX, |s| LexemeKind::Whitespace(s)) [INFO] [stderr] 82 | | .or_else(|| try_get(current_input, &IDENTIFIER_REGEX, convert_identifier_str)) [INFO] [stderr] 83 | | .or_else(|| try_get(current_input, &SYMBOL_REGEX, convert_symbol_str)) [INFO] [stderr] 84 | | .or_else(|| try_get(current_input, &INT_LITERAL_REGEX, |s| LexemeKind::IntLiteral(s.parse().unwrap()))) [INFO] [stderr] 85 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: this loop could be written as a `while let` loop [INFO] [stderr] --> src/lexer.rs:93:5 [INFO] [stderr] | [INFO] [stderr] 93 | / loop { [INFO] [stderr] 94 | | if let Some((new_input, consumed_input, lexeme_kind)) = get_next_token(current_input) { [INFO] [stderr] 95 | | current_input = new_input; [INFO] [stderr] 96 | | [INFO] [stderr] ... | [INFO] [stderr] 129 | | } [INFO] [stderr] 130 | | } [INFO] [stderr] | |_____^ help: try: `while let Some((new_input, consumed_input, lexeme_kind)) = get_next_token(current_input) { .. }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::while_let_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/lexer.rs:109:60 [INFO] [stderr] | [INFO] [stderr] 109 | let line_change_count = consumed_input.matches("\n").count(); [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] Finished dev [unoptimized + debuginfo] target(s) in 6.02s [INFO] running `"docker" "inspect" "f008a6cbacb7ac16a6049efa4af53d18ac99205666e4a48b8d578577657ce5dd"` [INFO] running `"docker" "rm" "-f" "f008a6cbacb7ac16a6049efa4af53d18ac99205666e4a48b8d578577657ce5dd"` [INFO] [stdout] f008a6cbacb7ac16a6049efa4af53d18ac99205666e4a48b8d578577657ce5dd