[INFO] crate comment-strip 0.1.3 is already in cache [INFO] extracting crate comment-strip 0.1.3 into work/ex/clippy-test-run/sources/stable/reg/comment-strip/0.1.3 [INFO] extracting crate comment-strip 0.1.3 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/comment-strip/0.1.3 [INFO] validating manifest of comment-strip-0.1.3 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 comment-strip-0.1.3 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 comment-strip-0.1.3 [INFO] finished frobbing comment-strip-0.1.3 [INFO] frobbed toml for comment-strip-0.1.3 written to work/ex/clippy-test-run/sources/stable/reg/comment-strip/0.1.3/Cargo.toml [INFO] started frobbing comment-strip-0.1.3 [INFO] finished frobbing comment-strip-0.1.3 [INFO] frobbed toml for comment-strip-0.1.3 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/comment-strip/0.1.3/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 comment-strip-0.1.3 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/comment-strip/0.1.3:/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] 47e5fe26a65be2a89be58bb77ca6c59bd3f02f8cdee5eace9994527ea2f379a0 [INFO] running `"docker" "start" "-a" "47e5fe26a65be2a89be58bb77ca6c59bd3f02f8cdee5eace9994527ea2f379a0"` [INFO] [stderr] Checking comment-strip v0.1.3 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/c.rs:153:47 [INFO] [stderr] | [INFO] [stderr] 153 | matches.push(CommentMatch{from: from, to: position}); [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `from` [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/c.rs:164:47 [INFO] [stderr] | [INFO] [stderr] 164 | matches.push(CommentMatch{from: from, to: position}); [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `from` [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/shell.rs:127:47 [INFO] [stderr] | [INFO] [stderr] 127 | matches.push(CommentMatch{from: from, to: position}); [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `from` [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/shell.rs:131:47 [INFO] [stderr] | [INFO] [stderr] 131 | matches.push(CommentMatch{from: from, to: position}); [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `from` [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/xml.rs:162:47 [INFO] [stderr] | [INFO] [stderr] 162 | matches.push(CommentMatch{from: from, to: position}); [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `from` [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/xml.rs:173:47 [INFO] [stderr] | [INFO] [stderr] 173 | matches.push(CommentMatch{from: from, to: position}); [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `from` [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/blanklines.rs:112:47 [INFO] [stderr] | [INFO] [stderr] 112 | matches.push(CommentMatch{from: from, to: position}); [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `from` [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/c.rs:153:47 [INFO] [stderr] | [INFO] [stderr] 153 | matches.push(CommentMatch{from: from, to: position}); [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `from` [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/c.rs:164:47 [INFO] [stderr] | [INFO] [stderr] 164 | matches.push(CommentMatch{from: from, to: position}); [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `from` [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/shell.rs:127:47 [INFO] [stderr] | [INFO] [stderr] 127 | matches.push(CommentMatch{from: from, to: position}); [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `from` [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/shell.rs:131:47 [INFO] [stderr] | [INFO] [stderr] 131 | matches.push(CommentMatch{from: from, to: position}); [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `from` [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/xml.rs:162:47 [INFO] [stderr] | [INFO] [stderr] 162 | matches.push(CommentMatch{from: from, to: position}); [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `from` [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/xml.rs:173:47 [INFO] [stderr] | [INFO] [stderr] 173 | matches.push(CommentMatch{from: from, to: position}); [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `from` [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/blanklines.rs:112:47 [INFO] [stderr] | [INFO] [stderr] 112 | matches.push(CommentMatch{from: from, to: position}); [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `from` [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: All variants have the same postfix: `Comment` [INFO] [stderr] --> src/c.rs:115:1 [INFO] [stderr] | [INFO] [stderr] 115 | / enum CommentState { [INFO] [stderr] 116 | | NotInComment, [INFO] [stderr] 117 | | MaybeInComment(usize), [INFO] [stderr] 118 | | InComment(usize) [INFO] [stderr] 119 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::enum_variant_names)] on by default [INFO] [stderr] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stderr] [INFO] [stderr] warning: All variants have the same postfix: `Comment` [INFO] [stderr] --> src/shell.rs:95:1 [INFO] [stderr] | [INFO] [stderr] 95 | / enum CommentState { [INFO] [stderr] 96 | | NotInComment, [INFO] [stderr] 97 | | MaybeInComment(usize), [INFO] [stderr] 98 | | InComment(usize) [INFO] [stderr] 99 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stderr] [INFO] [stderr] warning: All variants have the same postfix: `Comment` [INFO] [stderr] --> src/c.rs:115:1 [INFO] [stderr] | [INFO] [stderr] 115 | / enum CommentState { [INFO] [stderr] 116 | | NotInComment, [INFO] [stderr] 117 | | MaybeInComment(usize), [INFO] [stderr] 118 | | InComment(usize) [INFO] [stderr] 119 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::enum_variant_names)] on by default [INFO] [stderr] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stderr] [INFO] [stderr] warning: All variants have the same postfix: `Comment` [INFO] [stderr] --> src/shell.rs:95:1 [INFO] [stderr] | [INFO] [stderr] 95 | / enum CommentState { [INFO] [stderr] 96 | | NotInComment, [INFO] [stderr] 97 | | MaybeInComment(usize), [INFO] [stderr] 98 | | InComment(usize) [INFO] [stderr] 99 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/lib.rs:74:38 [INFO] [stderr] | [INFO] [stderr] 74 | fn find_comments(input: &str, style: &CommentStyle) -> Result, &'static str> { [INFO] [stderr] | ^^^^^^^^^^^^^ help: consider passing by value instead: `CommentStyle` [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: you don't need to add `&` to all patterns [INFO] [stderr] --> src/lib.rs:75:5 [INFO] [stderr] | [INFO] [stderr] 75 | / match style { [INFO] [stderr] 76 | | &CommentStyle::C => c::find_comments(input), [INFO] [stderr] 77 | | &CommentStyle::Shell => shell::find_comments(input), [INFO] [stderr] 78 | | &CommentStyle::XML => xml::find_comments(input) [INFO] [stderr] 79 | | } [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] 75 | match *style { [INFO] [stderr] 76 | CommentStyle::C => c::find_comments(input), [INFO] [stderr] 77 | CommentStyle::Shell => shell::find_comments(input), [INFO] [stderr] 78 | CommentStyle::XML => xml::find_comments(input) [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/lib.rs:95:47 [INFO] [stderr] | [INFO] [stderr] 95 | fn check_sorted_matches(input: &str, matches: &Vec) -> Result<(), &'static str> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: change this to: `&[CommentMatch]` [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: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/lib.rs:74:38 [INFO] [stderr] | [INFO] [stderr] 74 | fn find_comments(input: &str, style: &CommentStyle) -> Result, &'static str> { [INFO] [stderr] | ^^^^^^^^^^^^^ help: consider passing by value instead: `CommentStyle` [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: you don't need to add `&` to all patterns [INFO] [stderr] --> src/lib.rs:75:5 [INFO] [stderr] | [INFO] [stderr] 75 | / match style { [INFO] [stderr] 76 | | &CommentStyle::C => c::find_comments(input), [INFO] [stderr] 77 | | &CommentStyle::Shell => shell::find_comments(input), [INFO] [stderr] 78 | | &CommentStyle::XML => xml::find_comments(input) [INFO] [stderr] 79 | | } [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] 75 | match *style { [INFO] [stderr] 76 | CommentStyle::C => c::find_comments(input), [INFO] [stderr] 77 | CommentStyle::Shell => shell::find_comments(input), [INFO] [stderr] 78 | CommentStyle::XML => xml::find_comments(input) [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/lib.rs:95:47 [INFO] [stderr] | [INFO] [stderr] 95 | fn check_sorted_matches(input: &str, matches: &Vec) -> Result<(), &'static str> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: change this to: `&[CommentMatch]` [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] Finished dev [unoptimized + debuginfo] target(s) in 3.65s [INFO] running `"docker" "inspect" "47e5fe26a65be2a89be58bb77ca6c59bd3f02f8cdee5eace9994527ea2f379a0"` [INFO] running `"docker" "rm" "-f" "47e5fe26a65be2a89be58bb77ca6c59bd3f02f8cdee5eace9994527ea2f379a0"` [INFO] [stdout] 47e5fe26a65be2a89be58bb77ca6c59bd3f02f8cdee5eace9994527ea2f379a0