[INFO] crate tera 0.11.20 is already in cache [INFO] extracting crate tera 0.11.20 into work/ex/clippy-test-run/sources/stable/reg/tera/0.11.20 [INFO] extracting crate tera 0.11.20 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/tera/0.11.20 [INFO] validating manifest of tera-0.11.20 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 tera-0.11.20 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 tera-0.11.20 [INFO] finished frobbing tera-0.11.20 [INFO] frobbed toml for tera-0.11.20 written to work/ex/clippy-test-run/sources/stable/reg/tera/0.11.20/Cargo.toml [INFO] started frobbing tera-0.11.20 [INFO] finished frobbing tera-0.11.20 [INFO] frobbed toml for tera-0.11.20 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/tera/0.11.20/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 tera-0.11.20 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-7/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/tera/0.11.20:/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] 8fbeb4185f38238dffe9ef93bef660371c0f9dfed6fc7852976ebc51baf06967 [INFO] running `"docker" "start" "-a" "8fbeb4185f38238dffe9ef93bef660371c0f9dfed6fc7852976ebc51baf06967"` [INFO] [stderr] Checking tera v0.11.20 (/opt/crater/workdir) [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/builtins/filters/common.rs:181:36 [INFO] [stderr] | [INFO] [stderr] 181 | let result = date(to_value(1482720453).unwrap(), args); [INFO] [stderr] | ^^^^^^^^^^ help: consider: `1_482_720_453` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unreadable_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/builtins/filters/common.rs:190:36 [INFO] [stderr] | [INFO] [stderr] 190 | let result = date(to_value(1482720453).unwrap(), args); [INFO] [stderr] | ^^^^^^^^^^ help: consider: `1_482_720_453` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/builtins/filters/number.rs:111:37 [INFO] [stderr] | [INFO] [stderr] 111 | let result = round(to_value(3.15159265359).unwrap(), args); [INFO] [stderr] | ^^^^^^^^^^^^^ help: consider: `3.151_592_653_59` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/builtins/filters/number.rs:157:46 [INFO] [stderr] | [INFO] [stderr] 157 | let result = filesizeformat(to_value(123456789).unwrap(), args); [INFO] [stderr] | ^^^^^^^^^ help: consider: `123_456_789` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] error: this `if` has identical blocks [INFO] [stderr] --> src/builtins/filters/string.rs:132:44 [INFO] [stderr] | [INFO] [stderr] 132 | } else if byte >= 65 && byte <= 90 { [INFO] [stderr] | ____________________________________________^ [INFO] [stderr] 133 | | // uppercase character [INFO] [stderr] 134 | | false [INFO] [stderr] 135 | | } else if byte >= 97 && byte <= 122 { [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/builtins/filters/string.rs:129:37 [INFO] [stderr] | [INFO] [stderr] 129 | if byte >= 48 && byte <= 57 { [INFO] [stderr] | _____________________________________^ [INFO] [stderr] 130 | | // digit [INFO] [stderr] 131 | | false [INFO] [stderr] 132 | | } else if byte >= 65 && byte <= 90 { [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: large size difference between variants [INFO] [stderr] --> src/parser/ast.rs:301:5 [INFO] [stderr] | [INFO] [stderr] 301 | Forloop(WS, Forloop, WS), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::large_enum_variant)] on by default [INFO] [stderr] help: consider boxing the large fields to reduce the total size of the enum [INFO] [stderr] --> src/parser/ast.rs:301:5 [INFO] [stderr] | [INFO] [stderr] 301 | Forloop(WS, Forloop, WS), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 52 [INFO] [stderr] --> src/parser/whitespace.rs:30:1 [INFO] [stderr] | [INFO] [stderr] 30 | / pub fn remove_whitespace(nodes: Vec, body_ws: Option) -> Vec { [INFO] [stderr] 31 | | let mut res = Vec::with_capacity(nodes.len()); [INFO] [stderr] 32 | | [INFO] [stderr] 33 | | // Whether the node we just added to res is a Text node [INFO] [stderr] ... | [INFO] [stderr] 185 | | res [INFO] [stderr] 186 | | } [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: you don't need to add `&` to all patterns [INFO] [stderr] --> src/renderer/stack_frame.rs:16:5 [INFO] [stderr] | [INFO] [stderr] 16 | / match val { [INFO] [stderr] 17 | | &Cow::Borrowed(r) => { [INFO] [stderr] 18 | | r.pointer(&get_json_pointer(pointer)).map(|found| Cow::Borrowed(found)) [INFO] [stderr] 19 | | } [INFO] [stderr] ... | [INFO] [stderr] 22 | | } [INFO] [stderr] 23 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 16 | match *val { [INFO] [stderr] 17 | Cow::Borrowed(r) => { [INFO] [stderr] 18 | r.pointer(&get_json_pointer(pointer)).map(|found| Cow::Borrowed(found)) [INFO] [stderr] 19 | } [INFO] [stderr] 20 | Cow::Owned(ref r) => { [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `tera`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: this `if` has identical blocks [INFO] [stderr] --> src/builtins/filters/string.rs:132:44 [INFO] [stderr] | [INFO] [stderr] 132 | } else if byte >= 65 && byte <= 90 { [INFO] [stderr] | ____________________________________________^ [INFO] [stderr] 133 | | // uppercase character [INFO] [stderr] 134 | | false [INFO] [stderr] 135 | | } else if byte >= 97 && byte <= 122 { [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/builtins/filters/string.rs:129:37 [INFO] [stderr] | [INFO] [stderr] 129 | if byte >= 48 && byte <= 57 { [INFO] [stderr] | _____________________________________^ [INFO] [stderr] 130 | | // digit [INFO] [stderr] 131 | | false [INFO] [stderr] 132 | | } else if byte >= 65 && byte <= 90 { [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: single-character string constant used as pattern [INFO] [stderr] --> src/builtins/functions.rs:162:48 [INFO] [stderr] | [INFO] [stderr] 162 | assert!(res.as_str().unwrap().contains("T")); [INFO] [stderr] | ^^^ help: try using a char instead: `'T'` [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: single-character string constant used as pattern [INFO] [stderr] --> src/builtins/functions.rs:174:30 [INFO] [stderr] | [INFO] [stderr] 174 | assert!(val.contains("T")); [INFO] [stderr] | ^^^ help: try using a char instead: `'T'` [INFO] [stderr] | [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: called `.get().unwrap()` on a BTreeMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/context.rs:173:21 [INFO] [stderr] | [INFO] [stderr] 173 | assert_eq!(*target.data.get("a").unwrap(), to_value(1).unwrap()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&target.data["a"]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::get_unwrap)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a BTreeMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/context.rs:174:21 [INFO] [stderr] | [INFO] [stderr] 174 | assert_eq!(*target.data.get("b").unwrap(), to_value(3).unwrap()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&target.data["b"]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a BTreeMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/context.rs:175:21 [INFO] [stderr] | [INFO] [stderr] 175 | assert_eq!(*target.data.get("c").unwrap(), to_value(4).unwrap()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&target.data["c"]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: large size difference between variants [INFO] [stderr] --> src/parser/ast.rs:301:5 [INFO] [stderr] | [INFO] [stderr] 301 | Forloop(WS, Forloop, WS), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::large_enum_variant)] on by default [INFO] [stderr] help: consider boxing the large fields to reduce the total size of the enum [INFO] [stderr] --> src/parser/ast.rs:301:5 [INFO] [stderr] | [INFO] [stderr] 301 | Forloop(WS, Forloop, WS), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 52 [INFO] [stderr] --> src/parser/whitespace.rs:30:1 [INFO] [stderr] | [INFO] [stderr] 30 | / pub fn remove_whitespace(nodes: Vec, body_ws: Option) -> Vec { [INFO] [stderr] 31 | | let mut res = Vec::with_capacity(nodes.len()); [INFO] [stderr] 32 | | [INFO] [stderr] 33 | | // Whether the node we just added to res is a Text node [INFO] [stderr] ... | [INFO] [stderr] 185 | | res [INFO] [stderr] 186 | | } [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] error: approximate value of `f{32, 64}::consts::PI` found. Consider using it directly [INFO] [stderr] --> src/parser/tests/parser.rs:83:69 [INFO] [stderr] | [INFO] [stderr] 83 | assert_eq!(ast[1], Node::VariableBlock(Expr::new(ExprVal::Float(3.14)))); [INFO] [stderr] | ^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::approx_constant)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#approx_constant [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/parser/tests/parser.rs:660:25 [INFO] [stderr] | [INFO] [stderr] 660 | end_ws.clone(), [INFO] [stderr] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `end_ws` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] error: approximate value of `f{32, 64}::consts::PI` found. Consider using it directly [INFO] [stderr] --> src/renderer/tests/basic.rs:508:32 [INFO] [stderr] | [INFO] [stderr] 508 | context.insert("a_float", &3.14); [INFO] [stderr] | ^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#approx_constant [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/renderer/stack_frame.rs:16:5 [INFO] [stderr] | [INFO] [stderr] 16 | / match val { [INFO] [stderr] 17 | | &Cow::Borrowed(r) => { [INFO] [stderr] 18 | | r.pointer(&get_json_pointer(pointer)).map(|found| Cow::Borrowed(found)) [INFO] [stderr] 19 | | } [INFO] [stderr] ... | [INFO] [stderr] 22 | | } [INFO] [stderr] 23 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 16 | match *val { [INFO] [stderr] 17 | Cow::Borrowed(r) => { [INFO] [stderr] 18 | r.pointer(&get_json_pointer(pointer)).map(|found| Cow::Borrowed(found)) [INFO] [stderr] 19 | } [INFO] [stderr] 20 | Cow::Owned(ref r) => { [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/tera.rs:792:13 [INFO] [stderr] | [INFO] [stderr] 792 | tera.get_template("child").unwrap().blocks_definitions.get("hey").unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&tera.get_template("child").unwrap().blocks_definitions["hey"]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/tera.rs:796:13 [INFO] [stderr] | [INFO] [stderr] 796 | tera.get_template("child").unwrap().blocks_definitions.get("ending").unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&tera.get_template("child").unwrap().blocks_definitions["ending"]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/tera.rs:816:13 [INFO] [stderr] | [INFO] [stderr] 816 | tera.get_template("child").unwrap().blocks_definitions.get("hey").unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&tera.get_template("child").unwrap().blocks_definitions["hey"]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/tera.rs:820:13 [INFO] [stderr] | [INFO] [stderr] 820 | tera.get_template("parent").unwrap().blocks_definitions.get("ending").unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&tera.get_template("parent").unwrap().blocks_definitions["ending"]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] error: aborting due to 3 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `tera`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "8fbeb4185f38238dffe9ef93bef660371c0f9dfed6fc7852976ebc51baf06967"` [INFO] running `"docker" "rm" "-f" "8fbeb4185f38238dffe9ef93bef660371c0f9dfed6fc7852976ebc51baf06967"` [INFO] [stdout] 8fbeb4185f38238dffe9ef93bef660371c0f9dfed6fc7852976ebc51baf06967