[INFO] crate tracery 0.1.0 is already in cache [INFO] extracting crate tracery 0.1.0 into work/ex/clippy-test-run/sources/stable/reg/tracery/0.1.0 [INFO] extracting crate tracery 0.1.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/tracery/0.1.0 [INFO] validating manifest of tracery-0.1.0 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 tracery-0.1.0 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 tracery-0.1.0 [INFO] finished frobbing tracery-0.1.0 [INFO] frobbed toml for tracery-0.1.0 written to work/ex/clippy-test-run/sources/stable/reg/tracery/0.1.0/Cargo.toml [INFO] started frobbing tracery-0.1.0 [INFO] finished frobbing tracery-0.1.0 [INFO] frobbed toml for tracery-0.1.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/tracery/0.1.0/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 tracery-0.1.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-3/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/tracery/0.1.0:/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] 413e7bbf80bc7b0413f2d7e1b39c66d38c7c77d8338e61b3829a806f7c160c02 [INFO] running `"docker" "start" "-a" "413e7bbf80bc7b0413f2d7e1b39c66d38c7c77d8338e61b3829a806f7c160c02"` [INFO] [stderr] Checking serde_json v0.7.4 [INFO] [stderr] Checking Inflector v0.2.1 [INFO] [stderr] Checking tracery v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: use of deprecated item 'rand::sample': renamed to seq::sample_iter [INFO] [stderr] --> src/tag.rs:49:30 [INFO] [stderr] | [INFO] [stderr] 49 | let choice_vec = rand::sample(&mut rng, rules.iter(), 1); [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(deprecated)] on by default [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'rand::sample': renamed to seq::sample_iter [INFO] [stderr] --> src/grammar.rs:181:28 [INFO] [stderr] | [INFO] [stderr] 181 | let rule = rand::sample(&mut rng, rules, 1); [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'rand::sample': renamed to seq::sample_iter [INFO] [stderr] --> src/tag.rs:49:30 [INFO] [stderr] | [INFO] [stderr] 49 | let choice_vec = rand::sample(&mut rng, rules.iter(), 1); [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(deprecated)] on by default [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'rand::sample': renamed to seq::sample_iter [INFO] [stderr] --> src/grammar.rs:181:28 [INFO] [stderr] | [INFO] [stderr] 181 | let rule = rand::sample(&mut rng, rules, 1); [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stderr] --> src/grammar.rs:135:58 [INFO] [stderr] | [INFO] [stderr] 135 | pub fn get_modifier(&self, modifier: &str) -> Option<&Box String>> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&Fn(&str) -> String` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::borrowed_box)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/grammar.rs:208:9 [INFO] [stderr] | [INFO] [stderr] 208 | / match self { [INFO] [stderr] 209 | | &Node::Tag(ref tag) => tag.flatten(grammar, overrides), [INFO] [stderr] 210 | | &Node::Text(ref s) => s.flatten(grammar, overrides), [INFO] [stderr] 211 | | } [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] 208 | match *self { [INFO] [stderr] 209 | Node::Tag(ref tag) => tag.flatten(grammar, overrides), [INFO] [stderr] 210 | Node::Text(ref s) => s.flatten(grammar, overrides), [INFO] [stderr] | [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/parser.rs:12:1 [INFO] [stderr] | [INFO] [stderr] 12 | / named!(action<&str, (String, Rule)>, [INFO] [stderr] 13 | | delimited!( [INFO] [stderr] 14 | | tag_s!("["), [INFO] [stderr] 15 | | chain!( [INFO] [stderr] ... | [INFO] [stderr] 22 | | ) [INFO] [stderr] 23 | | ); [INFO] [stderr] | |__^ [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] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [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/parser.rs:12:1 [INFO] [stderr] | [INFO] [stderr] 12 | / named!(action<&str, (String, Rule)>, [INFO] [stderr] 13 | | delimited!( [INFO] [stderr] 14 | | tag_s!("["), [INFO] [stderr] 15 | | chain!( [INFO] [stderr] ... | [INFO] [stderr] 22 | | ) [INFO] [stderr] 23 | | ); [INFO] [stderr] | |__^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [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/parser.rs:25:1 [INFO] [stderr] | [INFO] [stderr] 25 | / named!(modifier<&str, &str>, chain!( [INFO] [stderr] 26 | | tag_s!(".") ~ [INFO] [stderr] 27 | | label: alt!(take_until_s!(".") | take_until_s!("#")), [INFO] [stderr] 28 | | || label [INFO] [stderr] 29 | | )); [INFO] [stderr] | |___^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [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/parser.rs:25:1 [INFO] [stderr] | [INFO] [stderr] 25 | / named!(modifier<&str, &str>, chain!( [INFO] [stderr] 26 | | tag_s!(".") ~ [INFO] [stderr] 27 | | label: alt!(take_until_s!(".") | take_until_s!("#")), [INFO] [stderr] 28 | | || label [INFO] [stderr] 29 | | )); [INFO] [stderr] | |___^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [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/parser.rs:51:1 [INFO] [stderr] | [INFO] [stderr] 51 | / named!(pub text_as_node<&str, Node>, [INFO] [stderr] 52 | | map!( [INFO] [stderr] 53 | | alt!(take_until_s!("#") | rest_s), [INFO] [stderr] 54 | | Node::text [INFO] [stderr] 55 | | ) [INFO] [stderr] 56 | | ); [INFO] [stderr] | |__^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/parser.rs:63:16 [INFO] [stderr] | [INFO] [stderr] 63 | if i.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!i.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: length comparison to zero [INFO] [stderr] --> src/parser.rs:80:16 [INFO] [stderr] | [INFO] [stderr] 80 | if i.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!i.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: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stderr] --> src/grammar.rs:135:58 [INFO] [stderr] | [INFO] [stderr] 135 | pub fn get_modifier(&self, modifier: &str) -> Option<&Box String>> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&Fn(&str) -> String` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::borrowed_box)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/grammar.rs:208:9 [INFO] [stderr] | [INFO] [stderr] 208 | / match self { [INFO] [stderr] 209 | | &Node::Tag(ref tag) => tag.flatten(grammar, overrides), [INFO] [stderr] 210 | | &Node::Text(ref s) => s.flatten(grammar, overrides), [INFO] [stderr] 211 | | } [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] 208 | match *self { [INFO] [stderr] 209 | Node::Tag(ref tag) => tag.flatten(grammar, overrides), [INFO] [stderr] 210 | Node::Text(ref s) => s.flatten(grammar, overrides), [INFO] [stderr] | [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/parser.rs:12:1 [INFO] [stderr] | [INFO] [stderr] 12 | / named!(action<&str, (String, Rule)>, [INFO] [stderr] 13 | | delimited!( [INFO] [stderr] 14 | | tag_s!("["), [INFO] [stderr] 15 | | chain!( [INFO] [stderr] ... | [INFO] [stderr] 22 | | ) [INFO] [stderr] 23 | | ); [INFO] [stderr] | |__^ [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] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [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/parser.rs:12:1 [INFO] [stderr] | [INFO] [stderr] 12 | / named!(action<&str, (String, Rule)>, [INFO] [stderr] 13 | | delimited!( [INFO] [stderr] 14 | | tag_s!("["), [INFO] [stderr] 15 | | chain!( [INFO] [stderr] ... | [INFO] [stderr] 22 | | ) [INFO] [stderr] 23 | | ); [INFO] [stderr] | |__^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [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/parser.rs:25:1 [INFO] [stderr] | [INFO] [stderr] 25 | / named!(modifier<&str, &str>, chain!( [INFO] [stderr] 26 | | tag_s!(".") ~ [INFO] [stderr] 27 | | label: alt!(take_until_s!(".") | take_until_s!("#")), [INFO] [stderr] 28 | | || label [INFO] [stderr] 29 | | )); [INFO] [stderr] | |___^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [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/parser.rs:25:1 [INFO] [stderr] | [INFO] [stderr] 25 | / named!(modifier<&str, &str>, chain!( [INFO] [stderr] 26 | | tag_s!(".") ~ [INFO] [stderr] 27 | | label: alt!(take_until_s!(".") | take_until_s!("#")), [INFO] [stderr] 28 | | || label [INFO] [stderr] 29 | | )); [INFO] [stderr] | |___^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [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/parser.rs:51:1 [INFO] [stderr] | [INFO] [stderr] 51 | / named!(pub text_as_node<&str, Node>, [INFO] [stderr] 52 | | map!( [INFO] [stderr] 53 | | alt!(take_until_s!("#") | rest_s), [INFO] [stderr] 54 | | Node::text [INFO] [stderr] 55 | | ) [INFO] [stderr] 56 | | ); [INFO] [stderr] | |__^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/parser.rs:63:16 [INFO] [stderr] | [INFO] [stderr] 63 | if i.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!i.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: length comparison to zero [INFO] [stderr] --> src/parser.rs:80:16 [INFO] [stderr] | [INFO] [stderr] 80 | if i.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!i.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: Constants have by default a `'static` lifetime [INFO] [stderr] --> examples/main.rs:7:17 [INFO] [stderr] | [INFO] [stderr] 7 | const DEFAULT: &'static str = r#"{ [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> examples/main.rs:17:8 [INFO] [stderr] | [INFO] [stderr] 17 | if src.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `src.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] Finished dev [unoptimized + debuginfo] target(s) in 8.00s [INFO] running `"docker" "inspect" "413e7bbf80bc7b0413f2d7e1b39c66d38c7c77d8338e61b3829a806f7c160c02"` [INFO] running `"docker" "rm" "-f" "413e7bbf80bc7b0413f2d7e1b39c66d38c7c77d8338e61b3829a806f7c160c02"` [INFO] [stdout] 413e7bbf80bc7b0413f2d7e1b39c66d38c7c77d8338e61b3829a806f7c160c02