[INFO] crate strum_macros 0.12.0 is already in cache [INFO] extracting crate strum_macros 0.12.0 into work/ex/clippy-test-run/sources/stable/reg/strum_macros/0.12.0 [INFO] extracting crate strum_macros 0.12.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/strum_macros/0.12.0 [INFO] validating manifest of strum_macros-0.12.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 strum_macros-0.12.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 strum_macros-0.12.0 [INFO] finished frobbing strum_macros-0.12.0 [INFO] frobbed toml for strum_macros-0.12.0 written to work/ex/clippy-test-run/sources/stable/reg/strum_macros/0.12.0/Cargo.toml [INFO] started frobbing strum_macros-0.12.0 [INFO] finished frobbing strum_macros-0.12.0 [INFO] frobbed toml for strum_macros-0.12.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/strum_macros/0.12.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 strum_macros-0.12.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-0/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/strum_macros/0.12.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] 77bb4745941824a96956c423ce9bf63db3e249131f0a8ced110045c805c45703 [INFO] running `"docker" "start" "-a" "77bb4745941824a96956c423ce9bf63db3e249131f0a8ced110045c805c45703"` [INFO] [stderr] Checking heck v0.3.1 [INFO] [stderr] Checking syn v0.15.26 [INFO] [stderr] Checking strum_macros v0.12.0 (/opt/crater/workdir) [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/enum_discriminants.rs:22:33 [INFO] [stderr] | [INFO] [stderr] 22 | let derives = get_meta_list(discriminant_attrs.iter().map(|&m| m), "derive") [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `discriminant_attrs.iter().cloned()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::map_clone)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/enum_discriminants.rs:37:47 [INFO] [stderr] | [INFO] [stderr] 37 | let discriminants_name = unique_meta_list(discriminant_attrs.iter().map(|&m| m), "name") [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `discriminant_attrs.iter().cloned()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/enum_discriminants.rs:44:22 [INFO] [stderr] | [INFO] [stderr] 44 | filter_metas(discriminant_attrs.iter().map(|&m| m), |meta| match meta { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `discriminant_attrs.iter().cloned()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/enum_discriminants.rs:22:33 [INFO] [stderr] | [INFO] [stderr] 22 | let derives = get_meta_list(discriminant_attrs.iter().map(|&m| m), "derive") [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `discriminant_attrs.iter().cloned()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::map_clone)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/enum_messages.rs:34:16 [INFO] [stderr] | [INFO] [stderr] 34 | if serialization_variants.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `serialization_variants.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: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/enum_discriminants.rs:37:47 [INFO] [stderr] | [INFO] [stderr] 37 | let discriminants_name = unique_meta_list(discriminant_attrs.iter().map(|&m| m), "name") [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `discriminant_attrs.iter().cloned()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/enum_discriminants.rs:44:22 [INFO] [stderr] | [INFO] [stderr] 44 | filter_metas(discriminant_attrs.iter().map(|&m| m), |meta| match meta { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `discriminant_attrs.iter().cloned()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/from_string.rs:57:12 [INFO] [stderr] | [INFO] [stderr] 57 | if attrs.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `attrs.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: this `.filter_map` can be written more simply using `.filter` [INFO] [stderr] --> src/helpers.rs:18:5 [INFO] [stderr] | [INFO] [stderr] 18 | metas.filter_map(move |meta| if filter(meta) { Some(meta) } else { None }) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_filter_map)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map [INFO] [stderr] [INFO] [stderr] warning: identical conversion [INFO] [stderr] --> src/helpers.rs:72:34 [INFO] [stderr] | [INFO] [stderr] 72 | let mut curr = get_meta_list(metas.into_iter(), attr).collect::>(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `metas` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_conversion)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [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/helpers.rs:81:1 [INFO] [stderr] | [INFO] [stderr] 81 | / pub fn extract_list_metas<'meta>(metalist: &'meta MetaList) -> impl Iterator { [INFO] [stderr] 82 | | use syn::NestedMeta; [INFO] [stderr] 83 | | metalist.nested.iter().filter_map(|nested| match *nested { [INFO] [stderr] 84 | | NestedMeta::Meta(ref meta) => Some(meta), [INFO] [stderr] 85 | | _ => None, [INFO] [stderr] 86 | | }) [INFO] [stderr] 87 | | } [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: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/helpers.rs:90:1 [INFO] [stderr] | [INFO] [stderr] 90 | / pub fn get_meta_ident<'meta>(meta: &'meta Meta) -> Option<&'meta Ident> { [INFO] [stderr] 91 | | match *meta { [INFO] [stderr] 92 | | Meta::Word(ref ident) => Some(ident), [INFO] [stderr] 93 | | _ => None, [INFO] [stderr] 94 | | } [INFO] [stderr] 95 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/enum_messages.rs:34:16 [INFO] [stderr] | [INFO] [stderr] 34 | if serialization_variants.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `serialization_variants.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/from_string.rs:57:12 [INFO] [stderr] | [INFO] [stderr] 57 | if attrs.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `attrs.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: this `.filter_map` can be written more simply using `.filter` [INFO] [stderr] --> src/helpers.rs:18:5 [INFO] [stderr] | [INFO] [stderr] 18 | metas.filter_map(move |meta| if filter(meta) { Some(meta) } else { None }) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_filter_map)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map [INFO] [stderr] [INFO] [stderr] warning: identical conversion [INFO] [stderr] --> src/helpers.rs:72:34 [INFO] [stderr] | [INFO] [stderr] 72 | let mut curr = get_meta_list(metas.into_iter(), attr).collect::>(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `metas` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_conversion)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [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/helpers.rs:81:1 [INFO] [stderr] | [INFO] [stderr] 81 | / pub fn extract_list_metas<'meta>(metalist: &'meta MetaList) -> impl Iterator { [INFO] [stderr] 82 | | use syn::NestedMeta; [INFO] [stderr] 83 | | metalist.nested.iter().filter_map(|nested| match *nested { [INFO] [stderr] 84 | | NestedMeta::Meta(ref meta) => Some(meta), [INFO] [stderr] 85 | | _ => None, [INFO] [stderr] 86 | | }) [INFO] [stderr] 87 | | } [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: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/helpers.rs:90:1 [INFO] [stderr] | [INFO] [stderr] 90 | / pub fn get_meta_ident<'meta>(meta: &'meta Meta) -> Option<&'meta Ident> { [INFO] [stderr] 91 | | match *meta { [INFO] [stderr] 92 | | Meta::Word(ref ident) => Some(ident), [INFO] [stderr] 93 | | _ => None, [INFO] [stderr] 94 | | } [INFO] [stderr] 95 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 9.26s [INFO] running `"docker" "inspect" "77bb4745941824a96956c423ce9bf63db3e249131f0a8ced110045c805c45703"` [INFO] running `"docker" "rm" "-f" "77bb4745941824a96956c423ce9bf63db3e249131f0a8ced110045c805c45703"` [INFO] [stdout] 77bb4745941824a96956c423ce9bf63db3e249131f0a8ced110045c805c45703