[INFO] crate scraper 0.9.0 is already in cache [INFO] extracting crate scraper 0.9.0 into work/ex/clippy-test-run/sources/stable/reg/scraper/0.9.0 [INFO] extracting crate scraper 0.9.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/scraper/0.9.0 [INFO] validating manifest of scraper-0.9.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 scraper-0.9.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 scraper-0.9.0 [INFO] finished frobbing scraper-0.9.0 [INFO] frobbed toml for scraper-0.9.0 written to work/ex/clippy-test-run/sources/stable/reg/scraper/0.9.0/Cargo.toml [INFO] started frobbing scraper-0.9.0 [INFO] finished frobbing scraper-0.9.0 [INFO] frobbed toml for scraper-0.9.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/scraper/0.9.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 scraper-0.9.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-6/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/scraper/0.9.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] f4468fa47d0bf52017946502d5a918d368daaa28e6c420379b8da5c7a83cc4bb [INFO] running `"docker" "start" "-a" "f4468fa47d0bf52017946502d5a918d368daaa28e6c420379b8da5c7a83cc4bb"` [INFO] [stderr] Checking ego-tree v0.6.0 [INFO] [stderr] Checking scraper v0.9.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/html/mod.rs:90:13 [INFO] [stderr] | [INFO] [stderr] 90 | selector: selector, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `selector` [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/html/tree_sink.rs:83:13 [INFO] [stderr] | [INFO] [stderr] 83 | name: name, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `name` [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/html/tree_sink.rs:84:13 [INFO] [stderr] | [INFO] [stderr] 84 | public_id: public_id, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `public_id` [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/html/tree_sink.rs:85:13 [INFO] [stderr] | [INFO] [stderr] 85 | system_id: system_id, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `system_id` [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/html/tree_sink.rs:113:53 [INFO] [stderr] | [INFO] [stderr] 113 | parent.append(Node::Text(Text { 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/html/tree_sink.rs:156:65 [INFO] [stderr] | [INFO] [stderr] 156 | sibling.insert_before(Node::Text(Text { 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/element_ref/mod.rs:23:22 [INFO] [stderr] | [INFO] [stderr] 23 | ElementRef { node: node } [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `node` [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/element_ref/mod.rs:46:13 [INFO] [stderr] | [INFO] [stderr] 46 | inner: inner, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `inner` [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/element_ref/mod.rs:47:13 [INFO] [stderr] | [INFO] [stderr] 47 | selector: selector, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `selector` [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/element_ref/mod.rs:54:13 [INFO] [stderr] | [INFO] [stderr] 54 | traversal_scope: traversal_scope, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `traversal_scope` [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/html/mod.rs:90:13 [INFO] [stderr] | [INFO] [stderr] 90 | selector: selector, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `selector` [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/html/tree_sink.rs:83:13 [INFO] [stderr] | [INFO] [stderr] 83 | name: name, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `name` [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/html/tree_sink.rs:84:13 [INFO] [stderr] | [INFO] [stderr] 84 | public_id: public_id, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `public_id` [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/html/tree_sink.rs:85:13 [INFO] [stderr] | [INFO] [stderr] 85 | system_id: system_id, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `system_id` [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/html/tree_sink.rs:113:53 [INFO] [stderr] | [INFO] [stderr] 113 | parent.append(Node::Text(Text { 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/html/tree_sink.rs:156:65 [INFO] [stderr] | [INFO] [stderr] 156 | sibling.insert_before(Node::Text(Text { 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/element_ref/mod.rs:23:22 [INFO] [stderr] | [INFO] [stderr] 23 | ElementRef { node: node } [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `node` [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/element_ref/mod.rs:46:13 [INFO] [stderr] | [INFO] [stderr] 46 | inner: inner, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `inner` [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/element_ref/mod.rs:47:13 [INFO] [stderr] | [INFO] [stderr] 47 | selector: selector, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `selector` [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/element_ref/mod.rs:54:13 [INFO] [stderr] | [INFO] [stderr] 54 | traversal_scope: traversal_scope, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `traversal_scope` [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: this boolean expression can be simplified [INFO] [stderr] --> src/html/tree_sink.rs:137:12 [INFO] [stderr] | [INFO] [stderr] 137 | if !sibling.parent().is_none() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sibling.parent().is_some()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::nonminimal_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stderr] [INFO] [stderr] warning: this boolean expression can be simplified [INFO] [stderr] --> src/html/tree_sink.rs:137:12 [INFO] [stderr] | [INFO] [stderr] 137 | if !sibling.parent().is_none() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sibling.parent().is_some()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::nonminimal_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/element_ref/mod.rs:119:17 [INFO] [stderr] | [INFO] [stderr] 119 | / if let &Node::Text(ref text) = node.value() { [INFO] [stderr] 120 | | return Some(&*text); [INFO] [stderr] 121 | | } [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] 119 | if let Node::Text(ref text) = *node.value() { [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/selector.rs:26:5 [INFO] [stderr] | [INFO] [stderr] 26 | / pub fn parse<'t, 'i>( [INFO] [stderr] 27 | | selectors: &'i str, [INFO] [stderr] 28 | | ) -> Result>> { [INFO] [stderr] 29 | | let mut parser_input = cssparser::ParserInput::new(selectors); [INFO] [stderr] 30 | | let mut parser = cssparser::Parser::new(&mut parser_input); [INFO] [stderr] 31 | | parser::SelectorList::parse(&Parser, &mut parser).map(|list| Selector { selectors: list.0 }) [INFO] [stderr] 32 | | } [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: this lifetime isn't used in the function definition [INFO] [stderr] --> src/selector.rs:26:18 [INFO] [stderr] | [INFO] [stderr] 26 | pub fn parse<'t, 'i>( [INFO] [stderr] | ^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::extra_unused_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/element_ref/mod.rs:119:17 [INFO] [stderr] | [INFO] [stderr] 119 | / if let &Node::Text(ref text) = node.value() { [INFO] [stderr] 120 | | return Some(&*text); [INFO] [stderr] 121 | | } [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] 119 | if let Node::Text(ref text) = *node.value() { [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/selector.rs:26:5 [INFO] [stderr] | [INFO] [stderr] 26 | / pub fn parse<'t, 'i>( [INFO] [stderr] 27 | | selectors: &'i str, [INFO] [stderr] 28 | | ) -> Result>> { [INFO] [stderr] 29 | | let mut parser_input = cssparser::ParserInput::new(selectors); [INFO] [stderr] 30 | | let mut parser = cssparser::Parser::new(&mut parser_input); [INFO] [stderr] 31 | | parser::SelectorList::parse(&Parser, &mut parser).map(|list| Selector { selectors: list.0 }) [INFO] [stderr] 32 | | } [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: this lifetime isn't used in the function definition [INFO] [stderr] --> src/selector.rs:26:18 [INFO] [stderr] | [INFO] [stderr] 26 | pub fn parse<'t, 'i>( [INFO] [stderr] | ^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::extra_unused_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> examples/fragment.rs:17:5 [INFO] [stderr] | [INFO] [stderr] 17 | write!(stdout, "HTML fragment:\n").unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::write_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> examples/document.rs:17:5 [INFO] [stderr] | [INFO] [stderr] 17 | write!(stdout, "HTML document:\n").unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::write_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: this `.fold` can be written more succinctly using another method [INFO] [stderr] --> src/main.rs:124:72 [INFO] [stderr] | [INFO] [stderr] 124 | .map(|mut f| query(&input, &output, &selector, &mut f)) [INFO] [stderr] | ________________________________________________________________________^ [INFO] [stderr] 125 | | .fold(false, |a, m| a || m) [INFO] [stderr] | |___________________________________________^ help: try: `.any(|m| m)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_fold)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/main.rs:121:19 [INFO] [stderr] | [INFO] [stderr] 121 | files.into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: this `.fold` can be written more succinctly using another method [INFO] [stderr] --> src/main.rs:124:72 [INFO] [stderr] | [INFO] [stderr] 124 | .map(|mut f| query(&input, &output, &selector, &mut f)) [INFO] [stderr] | ________________________________________________________________________^ [INFO] [stderr] 125 | | .fold(false, |a, m| a || m) [INFO] [stderr] | |___________________________________________^ help: try: `.any(|m| m)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_fold)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/main.rs:121:19 [INFO] [stderr] | [INFO] [stderr] 121 | files.into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 9.46s [INFO] running `"docker" "inspect" "f4468fa47d0bf52017946502d5a918d368daaa28e6c420379b8da5c7a83cc4bb"` [INFO] running `"docker" "rm" "-f" "f4468fa47d0bf52017946502d5a918d368daaa28e6c420379b8da5c7a83cc4bb"` [INFO] [stdout] f4468fa47d0bf52017946502d5a918d368daaa28e6c420379b8da5c7a83cc4bb