[INFO] updating cached repository pandaman64/Viterbi [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/pandaman64/Viterbi [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/pandaman64/Viterbi" "work/ex/clippy-test-run/sources/stable/gh/pandaman64/Viterbi"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/pandaman64/Viterbi'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/pandaman64/Viterbi" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/pandaman64/Viterbi"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/pandaman64/Viterbi'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 1be12a24efaaecbea7d623088cd1d247a39de7e4 [INFO] sha for GitHub repo pandaman64/Viterbi: 1be12a24efaaecbea7d623088cd1d247a39de7e4 [INFO] validating manifest of pandaman64/Viterbi 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 pandaman64/Viterbi 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 pandaman64/Viterbi [INFO] finished frobbing pandaman64/Viterbi [INFO] frobbed toml for pandaman64/Viterbi written to work/ex/clippy-test-run/sources/stable/gh/pandaman64/Viterbi/Cargo.toml [INFO] started frobbing pandaman64/Viterbi [INFO] finished frobbing pandaman64/Viterbi [INFO] frobbed toml for pandaman64/Viterbi written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/pandaman64/Viterbi/Cargo.toml [INFO] crate pandaman64/Viterbi 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 pandaman64/Viterbi 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/gh/pandaman64/Viterbi:/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] 92a1b6c7464b104144db448058b13acb8426773754f11b71d01ff2285345697a [INFO] running `"docker" "start" "-a" "92a1b6c7464b104144db448058b13acb8426773754f11b71d01ff2285345697a"` [INFO] [stderr] Checking viterbi v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:25:43 [INFO] [stderr] | [INFO] [stderr] 25 | let ret = Node{ id: arena.next_id,start: start,cost: cost,prev: prev,text: text }; [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `start` [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/main.rs:25:56 [INFO] [stderr] | [INFO] [stderr] 25 | let ret = Node{ id: arena.next_id,start: start,cost: cost,prev: prev,text: text }; [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `cost` [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/main.rs:25:67 [INFO] [stderr] | [INFO] [stderr] 25 | let ret = Node{ id: arena.next_id,start: start,cost: cost,prev: prev,text: text }; [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `prev` [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/main.rs:25:78 [INFO] [stderr] | [INFO] [stderr] 25 | let ret = Node{ id: arena.next_id,start: start,cost: cost,prev: prev,text: text }; [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `text` [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/main.rs:25:43 [INFO] [stderr] | [INFO] [stderr] 25 | let ret = Node{ id: arena.next_id,start: start,cost: cost,prev: prev,text: text }; [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `start` [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/main.rs:25:56 [INFO] [stderr] | [INFO] [stderr] 25 | let ret = Node{ id: arena.next_id,start: start,cost: cost,prev: prev,text: text }; [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `cost` [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/main.rs:25:67 [INFO] [stderr] | [INFO] [stderr] 25 | let ret = Node{ id: arena.next_id,start: start,cost: cost,prev: prev,text: text }; [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `prev` [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/main.rs:25:78 [INFO] [stderr] | [INFO] [stderr] 25 | let ret = Node{ id: arena.next_id,start: start,cost: cost,prev: prev,text: text }; [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `text` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:37:23 [INFO] [stderr] | [INFO] [stderr] 37 | fn viterbi(morphemes: &Vec,input: &str) -> String{ [INFO] [stderr] | ^^^^^^^^^^^^^^ help: change this to: `&[Morpheme]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: use of `or_insert` followed by a function call [INFO] [stderr] --> src/main.rs:41:39 [INFO] [stderr] | [INFO] [stderr] 41 | v.entry(morpheme.yomi[0]).or_insert(vec![]).push(morpheme); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try this: `or_insert_with(|| vec![])` [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: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:50:14 [INFO] [stderr] | [INFO] [stderr] 50 | for _ in 0..(input.len() + 1){ [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: use: `0..=input.len()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::range_plus_one)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stderr] --> src/main.rs:58:17 [INFO] [stderr] | [INFO] [stderr] 58 | for ref morpheme in morphemes.iter(){ [INFO] [stderr] | ^^^^^^^^^^^^ ---------------- help: try: `let morpheme = &morphemes.iter();` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::toplevel_ref_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stderr] [INFO] [stderr] warning: called `filter(p).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(p)` instead. [INFO] [stderr] --> src/main.rs:91:28 [INFO] [stderr] | [INFO] [stderr] 91 | let node = nodes[at].iter().filter(|&node| node.id == id).next().unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::filter_next)] on by default [INFO] [stderr] = note: replace `filter(|&node| node.id == id).next()` with `find(|&node| node.id == id)` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:37:23 [INFO] [stderr] | [INFO] [stderr] 37 | fn viterbi(morphemes: &Vec,input: &str) -> String{ [INFO] [stderr] | ^^^^^^^^^^^^^^ help: change this to: `&[Morpheme]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: use of `or_insert` followed by a function call [INFO] [stderr] --> src/main.rs:41:39 [INFO] [stderr] | [INFO] [stderr] 41 | v.entry(morpheme.yomi[0]).or_insert(vec![]).push(morpheme); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try this: `or_insert_with(|| vec![])` [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: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:50:14 [INFO] [stderr] | [INFO] [stderr] 50 | for _ in 0..(input.len() + 1){ [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: use: `0..=input.len()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::range_plus_one)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stderr] --> src/main.rs:58:17 [INFO] [stderr] | [INFO] [stderr] 58 | for ref morpheme in morphemes.iter(){ [INFO] [stderr] | ^^^^^^^^^^^^ ---------------- help: try: `let morpheme = &morphemes.iter();` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::toplevel_ref_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stderr] [INFO] [stderr] warning: called `filter(p).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(p)` instead. [INFO] [stderr] --> src/main.rs:91:28 [INFO] [stderr] | [INFO] [stderr] 91 | let node = nodes[at].iter().filter(|&node| node.id == id).next().unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::filter_next)] on by default [INFO] [stderr] = note: replace `filter(|&node| node.id == id).next()` with `find(|&node| node.id == id)` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 0.54s [INFO] running `"docker" "inspect" "92a1b6c7464b104144db448058b13acb8426773754f11b71d01ff2285345697a"` [INFO] running `"docker" "rm" "-f" "92a1b6c7464b104144db448058b13acb8426773754f11b71d01ff2285345697a"` [INFO] [stdout] 92a1b6c7464b104144db448058b13acb8426773754f11b71d01ff2285345697a