[INFO] cloning repository https://github.com/ohsayan/derived [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ohsayan/derived" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fohsayan%2Fderived", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fohsayan%2Fderived'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 9a9e1f56d37653e36f2d15b47d9cb7caa1cf89a8 [INFO] linting ohsayan/derived against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fohsayan%2Fderived" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/ohsayan/derived [INFO] finished tweaking git repo https://github.com/ohsayan/derived [INFO] tweaked toml for git repo https://github.com/ohsayan/derived written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/ohsayan/derived on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/ohsayan/derived already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] d3643527c31b495dc4b6e9694a7f2f96396127a0c08318f6aac2883d8baa314f [INFO] running `Command { std: "docker" "start" "-a" "d3643527c31b495dc4b6e9694a7f2f96396127a0c08318f6aac2883d8baa314f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d3643527c31b495dc4b6e9694a7f2f96396127a0c08318f6aac2883d8baa314f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d3643527c31b495dc4b6e9694a7f2f96396127a0c08318f6aac2883d8baa314f", kill_on_drop: false }` [INFO] [stdout] d3643527c31b495dc4b6e9694a7f2f96396127a0c08318f6aac2883d8baa314f [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] b1bb644b8d8de20f8a4ae5ee144e12d7bfe86b367a05495e6becd3fbf2200a57 [INFO] running `Command { std: "docker" "start" "-a" "b1bb644b8d8de20f8a4ae5ee144e12d7bfe86b367a05495e6becd3fbf2200a57", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.29 [INFO] [stderr] Compiling syn v1.0.77 [INFO] [stderr] Checking unicode-xid v0.2.2 [INFO] [stderr] Compiling quote v1.0.9 [INFO] [stderr] Checking derived v0.4.2 (/opt/rustwide/workdir/derived) [INFO] [stdout] warning: unused import: `ToTokens` [INFO] [stdout] --> derived/src/ctor.rs:9:27 [INFO] [stdout] | [INFO] [stdout] 9 | use quote::{format_ident, ToTokens}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> derived/src/constdef/type_analysis.rs:29:20 [INFO] [stdout] | [INFO] [stdout] 29 | Some(p) => match p { [INFO] [stdout] | ____________________^ [INFO] [stdout] 30 | | // attempt to evaluate paths like core::primitive:: or std::primitive:: [INFO] [stdout] 31 | | "core" | "std" => match path.next() { [INFO] [stdout] 32 | | Some(s) => match s.as_str() { [INFO] [stdout] ... | [INFO] [stdout] 43 | | _ => {} [INFO] [stdout] 44 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> derived/src/constdef/type_analysis.rs:29:14 [INFO] [stdout] | [INFO] [stdout] 29 | Some(p) => match p { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 30 | // attempt to evaluate paths like core::primitive:: or std::primitive:: [INFO] [stdout] 31 | "core" | "std" => match path.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> derived/src/constdef/type_analysis.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | / match path.next().map(|v| v.as_ref()) { [INFO] [stdout] 29 | | Some(p) => match p { [INFO] [stdout] 30 | | // attempt to evaluate paths like core::primitive:: or std::primitive:: [INFO] [stdout] 31 | | "core" | "std" => match path.next() { [INFO] [stdout] ... | [INFO] [stdout] 45 | | None => {} [INFO] [stdout] 46 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 28 ~ if let Some(p) = path.next().map(|v| v.as_ref()) { match p { [INFO] [stdout] 29 + // attempt to evaluate paths like core::primitive:: or std::primitive:: [INFO] [stdout] 30 + "core" | "std" => match path.next() { [INFO] [stdout] 31 + Some(s) => match s.as_str() { [INFO] [stdout] 32 + "primitive" => match path.next() { [INFO] [stdout] 33 + Some(ty) => { [INFO] [stdout] 34 + ret = Some(ty.to_owned()); [INFO] [stdout] 35 + } [INFO] [stdout] 36 + None => {} [INFO] [stdout] 37 + }, [INFO] [stdout] 38 + _ => {} [INFO] [stdout] 39 + }, [INFO] [stdout] 40 + None => {} [INFO] [stdout] 41 + }, [INFO] [stdout] 42 + _ => {} [INFO] [stdout] 43 + } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> derived/src/constdef/type_analysis.rs:31:31 [INFO] [stdout] | [INFO] [stdout] 31 | "core" | "std" => match path.next() { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 32 | | Some(s) => match s.as_str() { [INFO] [stdout] 33 | | "primitive" => match path.next() { [INFO] [stdout] 34 | | Some(ty) => { [INFO] [stdout] ... | [INFO] [stdout] 41 | | None => {} [INFO] [stdout] 42 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 31 ~ "core" | "std" => if let Some(s) = path.next() { match s.as_str() { [INFO] [stdout] 32 + "primitive" => match path.next() { [INFO] [stdout] 33 + Some(ty) => { [INFO] [stdout] 34 + ret = Some(ty.to_owned()); [INFO] [stdout] 35 + } [INFO] [stdout] 36 + None => {} [INFO] [stdout] 37 + }, [INFO] [stdout] 38 + _ => {} [INFO] [stdout] 39 ~ } }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> derived/src/constdef/type_analysis.rs:32:28 [INFO] [stdout] | [INFO] [stdout] 32 | Some(s) => match s.as_str() { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 33 | | "primitive" => match path.next() { [INFO] [stdout] 34 | | Some(ty) => { [INFO] [stdout] 35 | | ret = Some(ty.to_owned()); [INFO] [stdout] ... | [INFO] [stdout] 39 | | _ => {} [INFO] [stdout] 40 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 32 ~ Some(s) => if s.as_str() == "primitive" { match path.next() { [INFO] [stdout] 33 + Some(ty) => { [INFO] [stdout] 34 + ret = Some(ty.to_owned()); [INFO] [stdout] 35 + } [INFO] [stdout] 36 + None => {} [INFO] [stdout] 37 ~ } }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> derived/src/constdef/type_analysis.rs:33:36 [INFO] [stdout] | [INFO] [stdout] 33 | "primitive" => match path.next() { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 34 | | Some(ty) => { [INFO] [stdout] 35 | | ret = Some(ty.to_owned()); [INFO] [stdout] ... | [INFO] [stdout] 38 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 33 ~ "primitive" => if let Some(ty) = path.next() { [INFO] [stdout] 34 + ret = Some(ty.to_owned()); [INFO] [stdout] 35 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> derived/src/constdef.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | / return { [INFO] [stdout] 18 | | quote! { [INFO] [stdout] 19 | | impl #impl_gen #struct_name #ty_gen #where_clause { [INFO] [stdout] 20 | | pub const fn default() -> Self { [INFO] [stdout] ... | [INFO] [stdout] 31 | | .into(); [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 17 ~ { [INFO] [stdout] 18 + quote! { [INFO] [stdout] 19 + impl #impl_gen #struct_name #ty_gen #where_clause { [INFO] [stdout] 20 + pub const fn default() -> Self { [INFO] [stdout] 21 + Self {} [INFO] [stdout] 22 + } [INFO] [stdout] 23 + } [INFO] [stdout] 24 + impl #impl_gen ::core::default::Default for #struct_name #ty_gen #where_clause { [INFO] [stdout] 25 + fn default() -> Self { [INFO] [stdout] 26 + Self::default() [INFO] [stdout] 27 + } [INFO] [stdout] 28 + } [INFO] [stdout] 29 + } [INFO] [stdout] 30 + } [INFO] [stdout] 31 ~ .into() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> derived/src/ctor.rs:80:40 [INFO] [stdout] | [INFO] [stdout] 80 | let mock_ids: Vec = (0..types.len()) [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 81 | | .into_iter() [INFO] [stdout] | |____________________________^ help: consider removing `.into_iter()`: `(0..types.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ToTokens` [INFO] [stdout] --> derived/src/ctor.rs:9:27 [INFO] [stdout] | [INFO] [stdout] 9 | use quote::{format_ident, ToTokens}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> derived/src/gtor.rs:68:16 [INFO] [stdout] | [INFO] [stdout] 68 | if (is_skipped && is_explicitly_copy) || (is_explicitly_copy && is_phantom) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 68 - if (is_skipped && is_explicitly_copy) || (is_explicitly_copy && is_phantom) { [INFO] [stdout] 68 + if !(!is_explicitly_copy || !is_skipped && !is_phantom) { [INFO] [stdout] | [INFO] [stdout] 68 - if (is_skipped && is_explicitly_copy) || (is_explicitly_copy && is_phantom) { [INFO] [stdout] 68 + if (is_phantom || is_skipped) && is_explicitly_copy { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> derived/src/gtor.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | return "".parse().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 145 - return "".parse().unwrap(); [INFO] [stdout] 145 + "".parse().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> derived/src/stor.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | return "".parse().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 57 - return "".parse().unwrap(); [INFO] [stdout] 57 + "".parse().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> derived/src/stor.rs:28:73 [INFO] [stdout] | [INFO] [stdout] 28 | let is_skipped = ok_else_ret!(util::single_instance_of_attr(&attrs, ATTR_STOR_SKIP)); [INFO] [stdout] | ^^^^^^ help: change this to: `attrs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> derived/src/util.rs:49:6 [INFO] [stdout] | [INFO] [stdout] 49 | ) -> Result)>, TokenStream> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> derived/src/lib.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | /// the constructor, automatically adding `PhantomData` in the requisite positions [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 56 | /// the constructor, automatically adding `PhantomData` in the requisite positions [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> derived/src/lib.rs:109:5 [INFO] [stdout] | [INFO] [stdout] 109 | /// skipping getters, setters and ctors for the field [INFO] [stdout] | ^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unit tests in doctest are not executed [INFO] [stdout] --> derived/src/lib.rs:128:5 [INFO] [stdout] | [INFO] [stdout] 128 | /// #[test] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#test_attr_in_doctest [INFO] [stdout] = note: `#[warn(clippy::test_attr_in_doctest)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> derived/src/lib.rs:188:5 [INFO] [stdout] | [INFO] [stdout] 188 | /// [`PhantomData`](core::marker::PhantomData) fields. This has the same effect as `#[stor_skip]` [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 188 | /// [`PhantomData`](core::marker::PhantomData) fields. This has the same effect as `#[stor_skip]` [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> derived/src/lib.rs:189:5 [INFO] [stdout] | [INFO] [stdout] 189 | /// but it makes it easier to use with the other macros, avoiding the need to write skips for phantom [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 189 | /// but it makes it easier to use with the other macros, avoiding the need to write skips for phantom [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> derived/src/lib.rs:190:5 [INFO] [stdout] | [INFO] [stdout] 190 | /// fields specifically [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 190 | /// fields specifically [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> derived/src/util.rs:16:39 [INFO] [stdout] | [INFO] [stdout] 16 | pub fn get_struct_field_list_any(ast: &DeriveInput) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 16 | pub fn get_struct_field_list_any(ast: &DeriveInput) -> Result, TokenStream> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> derived/src/constdef/type_analysis.rs:29:20 [INFO] [stdout] | [INFO] [stdout] 29 | Some(p) => match p { [INFO] [stdout] | ____________________^ [INFO] [stdout] 30 | | // attempt to evaluate paths like core::primitive:: or std::primitive:: [INFO] [stdout] 31 | | "core" | "std" => match path.next() { [INFO] [stdout] 32 | | Some(s) => match s.as_str() { [INFO] [stdout] ... | [INFO] [stdout] 43 | | _ => {} [INFO] [stdout] 44 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> derived/src/constdef/type_analysis.rs:29:14 [INFO] [stdout] | [INFO] [stdout] 29 | Some(p) => match p { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 30 | // attempt to evaluate paths like core::primitive:: or std::primitive:: [INFO] [stdout] 31 | "core" | "std" => match path.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> derived/src/constdef/type_analysis.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | / match path.next().map(|v| v.as_ref()) { [INFO] [stdout] 29 | | Some(p) => match p { [INFO] [stdout] 30 | | // attempt to evaluate paths like core::primitive:: or std::primitive:: [INFO] [stdout] 31 | | "core" | "std" => match path.next() { [INFO] [stdout] ... | [INFO] [stdout] 45 | | None => {} [INFO] [stdout] 46 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 28 ~ if let Some(p) = path.next().map(|v| v.as_ref()) { match p { [INFO] [stdout] 29 + // attempt to evaluate paths like core::primitive:: or std::primitive:: [INFO] [stdout] 30 + "core" | "std" => match path.next() { [INFO] [stdout] 31 + Some(s) => match s.as_str() { [INFO] [stdout] 32 + "primitive" => match path.next() { [INFO] [stdout] 33 + Some(ty) => { [INFO] [stdout] 34 + ret = Some(ty.to_owned()); [INFO] [stdout] 35 + } [INFO] [stdout] 36 + None => {} [INFO] [stdout] 37 + }, [INFO] [stdout] 38 + _ => {} [INFO] [stdout] 39 + }, [INFO] [stdout] 40 + None => {} [INFO] [stdout] 41 + }, [INFO] [stdout] 42 + _ => {} [INFO] [stdout] 43 + } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> derived/src/constdef/type_analysis.rs:31:31 [INFO] [stdout] | [INFO] [stdout] 31 | "core" | "std" => match path.next() { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 32 | | Some(s) => match s.as_str() { [INFO] [stdout] 33 | | "primitive" => match path.next() { [INFO] [stdout] 34 | | Some(ty) => { [INFO] [stdout] ... | [INFO] [stdout] 41 | | None => {} [INFO] [stdout] 42 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 31 ~ "core" | "std" => if let Some(s) = path.next() { match s.as_str() { [INFO] [stdout] 32 + "primitive" => match path.next() { [INFO] [stdout] 33 + Some(ty) => { [INFO] [stdout] 34 + ret = Some(ty.to_owned()); [INFO] [stdout] 35 + } [INFO] [stdout] 36 + None => {} [INFO] [stdout] 37 + }, [INFO] [stdout] 38 + _ => {} [INFO] [stdout] 39 ~ } }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> derived/src/constdef/type_analysis.rs:32:28 [INFO] [stdout] | [INFO] [stdout] 32 | Some(s) => match s.as_str() { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 33 | | "primitive" => match path.next() { [INFO] [stdout] 34 | | Some(ty) => { [INFO] [stdout] 35 | | ret = Some(ty.to_owned()); [INFO] [stdout] ... | [INFO] [stdout] 39 | | _ => {} [INFO] [stdout] 40 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 32 ~ Some(s) => if s.as_str() == "primitive" { match path.next() { [INFO] [stdout] 33 + Some(ty) => { [INFO] [stdout] 34 + ret = Some(ty.to_owned()); [INFO] [stdout] 35 + } [INFO] [stdout] 36 + None => {} [INFO] [stdout] 37 ~ } }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> derived/src/constdef/type_analysis.rs:33:36 [INFO] [stdout] | [INFO] [stdout] 33 | "primitive" => match path.next() { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 34 | | Some(ty) => { [INFO] [stdout] 35 | | ret = Some(ty.to_owned()); [INFO] [stdout] ... | [INFO] [stdout] 38 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 33 ~ "primitive" => if let Some(ty) = path.next() { [INFO] [stdout] 34 + ret = Some(ty.to_owned()); [INFO] [stdout] 35 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> derived/src/constdef.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | / return { [INFO] [stdout] 18 | | quote! { [INFO] [stdout] 19 | | impl #impl_gen #struct_name #ty_gen #where_clause { [INFO] [stdout] 20 | | pub const fn default() -> Self { [INFO] [stdout] ... | [INFO] [stdout] 31 | | .into(); [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 17 ~ { [INFO] [stdout] 18 + quote! { [INFO] [stdout] 19 + impl #impl_gen #struct_name #ty_gen #where_clause { [INFO] [stdout] 20 + pub const fn default() -> Self { [INFO] [stdout] 21 + Self {} [INFO] [stdout] 22 + } [INFO] [stdout] 23 + } [INFO] [stdout] 24 + impl #impl_gen ::core::default::Default for #struct_name #ty_gen #where_clause { [INFO] [stdout] 25 + fn default() -> Self { [INFO] [stdout] 26 + Self::default() [INFO] [stdout] 27 + } [INFO] [stdout] 28 + } [INFO] [stdout] 29 + } [INFO] [stdout] 30 + } [INFO] [stdout] 31 ~ .into() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> derived/src/ctor.rs:80:40 [INFO] [stdout] | [INFO] [stdout] 80 | let mock_ids: Vec = (0..types.len()) [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 81 | | .into_iter() [INFO] [stdout] | |____________________________^ help: consider removing `.into_iter()`: `(0..types.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> derived/src/gtor.rs:68:16 [INFO] [stdout] | [INFO] [stdout] 68 | if (is_skipped && is_explicitly_copy) || (is_explicitly_copy && is_phantom) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 68 - if (is_skipped && is_explicitly_copy) || (is_explicitly_copy && is_phantom) { [INFO] [stdout] 68 + if !(!is_explicitly_copy || !is_skipped && !is_phantom) { [INFO] [stdout] | [INFO] [stdout] 68 - if (is_skipped && is_explicitly_copy) || (is_explicitly_copy && is_phantom) { [INFO] [stdout] 68 + if (is_phantom || is_skipped) && is_explicitly_copy { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> derived/src/gtor.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | return "".parse().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 145 - return "".parse().unwrap(); [INFO] [stdout] 145 + "".parse().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> derived/src/stor.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | return "".parse().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 57 - return "".parse().unwrap(); [INFO] [stdout] 57 + "".parse().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> derived/src/stor.rs:28:73 [INFO] [stdout] | [INFO] [stdout] 28 | let is_skipped = ok_else_ret!(util::single_instance_of_attr(&attrs, ATTR_STOR_SKIP)); [INFO] [stdout] | ^^^^^^ help: change this to: `attrs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> derived/src/util.rs:49:6 [INFO] [stdout] | [INFO] [stdout] 49 | ) -> Result)>, TokenStream> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> derived/src/lib.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | /// the constructor, automatically adding `PhantomData` in the requisite positions [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 56 | /// the constructor, automatically adding `PhantomData` in the requisite positions [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> derived/src/lib.rs:109:5 [INFO] [stdout] | [INFO] [stdout] 109 | /// skipping getters, setters and ctors for the field [INFO] [stdout] | ^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unit tests in doctest are not executed [INFO] [stdout] --> derived/src/lib.rs:128:5 [INFO] [stdout] | [INFO] [stdout] 128 | /// #[test] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#test_attr_in_doctest [INFO] [stdout] = note: `#[warn(clippy::test_attr_in_doctest)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> derived/src/lib.rs:188:5 [INFO] [stdout] | [INFO] [stdout] 188 | /// [`PhantomData`](core::marker::PhantomData) fields. This has the same effect as `#[stor_skip]` [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 188 | /// [`PhantomData`](core::marker::PhantomData) fields. This has the same effect as `#[stor_skip]` [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> derived/src/lib.rs:189:5 [INFO] [stdout] | [INFO] [stdout] 189 | /// but it makes it easier to use with the other macros, avoiding the need to write skips for phantom [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 189 | /// but it makes it easier to use with the other macros, avoiding the need to write skips for phantom [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> derived/src/lib.rs:190:5 [INFO] [stdout] | [INFO] [stdout] 190 | /// fields specifically [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 190 | /// fields specifically [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> derived/src/util.rs:16:39 [INFO] [stdout] | [INFO] [stdout] 16 | pub fn get_struct_field_list_any(ast: &DeriveInput) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 16 | pub fn get_struct_field_list_any(ast: &DeriveInput) -> Result, TokenStream> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ToTokens` [INFO] [stdout] --> derived/src/ctor.rs:9:27 [INFO] [stdout] | [INFO] [stdout] 9 | use quote::{format_ident, ToTokens}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> derived/src/constdef/type_analysis.rs:29:20 [INFO] [stdout] | [INFO] [stdout] 29 | Some(p) => match p { [INFO] [stdout] | ____________________^ [INFO] [stdout] 30 | | // attempt to evaluate paths like core::primitive:: or std::primitive:: [INFO] [stdout] 31 | | "core" | "std" => match path.next() { [INFO] [stdout] 32 | | Some(s) => match s.as_str() { [INFO] [stdout] ... | [INFO] [stdout] 43 | | _ => {} [INFO] [stdout] 44 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> derived/src/constdef/type_analysis.rs:29:14 [INFO] [stdout] | [INFO] [stdout] 29 | Some(p) => match p { [INFO] [stdout] | ^ replace this binding [INFO] [stdout] 30 | // attempt to evaluate paths like core::primitive:: or std::primitive:: [INFO] [stdout] 31 | "core" | "std" => match path.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> derived/src/constdef/type_analysis.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | / match path.next().map(|v| v.as_ref()) { [INFO] [stdout] 29 | | Some(p) => match p { [INFO] [stdout] 30 | | // attempt to evaluate paths like core::primitive:: or std::primitive:: [INFO] [stdout] 31 | | "core" | "std" => match path.next() { [INFO] [stdout] ... | [INFO] [stdout] 45 | | None => {} [INFO] [stdout] 46 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 28 ~ if let Some(p) = path.next().map(|v| v.as_ref()) { match p { [INFO] [stdout] 29 + // attempt to evaluate paths like core::primitive:: or std::primitive:: [INFO] [stdout] 30 + "core" | "std" => match path.next() { [INFO] [stdout] 31 + Some(s) => match s.as_str() { [INFO] [stdout] 32 + "primitive" => match path.next() { [INFO] [stdout] 33 + Some(ty) => { [INFO] [stdout] 34 + ret = Some(ty.to_owned()); [INFO] [stdout] 35 + } [INFO] [stdout] 36 + None => {} [INFO] [stdout] 37 + }, [INFO] [stdout] 38 + _ => {} [INFO] [stdout] 39 + }, [INFO] [stdout] 40 + None => {} [INFO] [stdout] 41 + }, [INFO] [stdout] 42 + _ => {} [INFO] [stdout] 43 + } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> derived/src/constdef/type_analysis.rs:31:31 [INFO] [stdout] | [INFO] [stdout] 31 | "core" | "std" => match path.next() { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 32 | | Some(s) => match s.as_str() { [INFO] [stdout] 33 | | "primitive" => match path.next() { [INFO] [stdout] 34 | | Some(ty) => { [INFO] [stdout] ... | [INFO] [stdout] 41 | | None => {} [INFO] [stdout] 42 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 31 ~ "core" | "std" => if let Some(s) = path.next() { match s.as_str() { [INFO] [stdout] 32 + "primitive" => match path.next() { [INFO] [stdout] 33 + Some(ty) => { [INFO] [stdout] 34 + ret = Some(ty.to_owned()); [INFO] [stdout] 35 + } [INFO] [stdout] 36 + None => {} [INFO] [stdout] 37 + }, [INFO] [stdout] 38 + _ => {} [INFO] [stdout] 39 ~ } }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> derived/src/constdef/type_analysis.rs:32:28 [INFO] [stdout] | [INFO] [stdout] 32 | Some(s) => match s.as_str() { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 33 | | "primitive" => match path.next() { [INFO] [stdout] 34 | | Some(ty) => { [INFO] [stdout] 35 | | ret = Some(ty.to_owned()); [INFO] [stdout] ... | [INFO] [stdout] 39 | | _ => {} [INFO] [stdout] 40 | | }, [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 32 ~ Some(s) => if s.as_str() == "primitive" { match path.next() { [INFO] [stdout] 33 + Some(ty) => { [INFO] [stdout] 34 + ret = Some(ty.to_owned()); [INFO] [stdout] 35 + } [INFO] [stdout] 36 + None => {} [INFO] [stdout] 37 ~ } }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> derived/src/constdef/type_analysis.rs:33:36 [INFO] [stdout] | [INFO] [stdout] 33 | "primitive" => match path.next() { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 34 | | Some(ty) => { [INFO] [stdout] 35 | | ret = Some(ty.to_owned()); [INFO] [stdout] ... | [INFO] [stdout] 38 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 33 ~ "primitive" => if let Some(ty) = path.next() { [INFO] [stdout] 34 + ret = Some(ty.to_owned()); [INFO] [stdout] 35 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> derived/src/constdef.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | / return { [INFO] [stdout] 18 | | quote! { [INFO] [stdout] 19 | | impl #impl_gen #struct_name #ty_gen #where_clause { [INFO] [stdout] 20 | | pub const fn default() -> Self { [INFO] [stdout] ... | [INFO] [stdout] 31 | | .into(); [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 17 ~ { [INFO] [stdout] 18 + quote! { [INFO] [stdout] 19 + impl #impl_gen #struct_name #ty_gen #where_clause { [INFO] [stdout] 20 + pub const fn default() -> Self { [INFO] [stdout] 21 + Self {} [INFO] [stdout] 22 + } [INFO] [stdout] 23 + } [INFO] [stdout] 24 + impl #impl_gen ::core::default::Default for #struct_name #ty_gen #where_clause { [INFO] [stdout] 25 + fn default() -> Self { [INFO] [stdout] 26 + Self::default() [INFO] [stdout] 27 + } [INFO] [stdout] 28 + } [INFO] [stdout] 29 + } [INFO] [stdout] 30 + } [INFO] [stdout] 31 ~ .into() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> derived/src/ctor.rs:80:40 [INFO] [stdout] | [INFO] [stdout] 80 | let mock_ids: Vec = (0..types.len()) [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 81 | | .into_iter() [INFO] [stdout] | |____________________________^ help: consider removing `.into_iter()`: `(0..types.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> derived/src/gtor.rs:68:16 [INFO] [stdout] | [INFO] [stdout] 68 | if (is_skipped && is_explicitly_copy) || (is_explicitly_copy && is_phantom) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 68 - if (is_skipped && is_explicitly_copy) || (is_explicitly_copy && is_phantom) { [INFO] [stdout] 68 + if !(!is_explicitly_copy || !is_skipped && !is_phantom) { [INFO] [stdout] | [INFO] [stdout] 68 - if (is_skipped && is_explicitly_copy) || (is_explicitly_copy && is_phantom) { [INFO] [stdout] 68 + if (is_phantom || is_skipped) && is_explicitly_copy { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> derived/src/gtor.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | return "".parse().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 145 - return "".parse().unwrap(); [INFO] [stdout] 145 + "".parse().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> derived/src/stor.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | return "".parse().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 57 - return "".parse().unwrap(); [INFO] [stdout] 57 + "".parse().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> derived/src/stor.rs:28:73 [INFO] [stdout] | [INFO] [stdout] 28 | let is_skipped = ok_else_ret!(util::single_instance_of_attr(&attrs, ATTR_STOR_SKIP)); [INFO] [stdout] | ^^^^^^ help: change this to: `attrs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> derived/src/util.rs:49:6 [INFO] [stdout] | [INFO] [stdout] 49 | ) -> Result)>, TokenStream> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> derived/src/lib.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | /// the constructor, automatically adding `PhantomData` in the requisite positions [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 56 | /// the constructor, automatically adding `PhantomData` in the requisite positions [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> derived/src/lib.rs:109:5 [INFO] [stdout] | [INFO] [stdout] 109 | /// skipping getters, setters and ctors for the field [INFO] [stdout] | ^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unit tests in doctest are not executed [INFO] [stdout] --> derived/src/lib.rs:128:5 [INFO] [stdout] | [INFO] [stdout] 128 | /// #[test] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#test_attr_in_doctest [INFO] [stdout] = note: `#[warn(clippy::test_attr_in_doctest)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> derived/src/lib.rs:188:5 [INFO] [stdout] | [INFO] [stdout] 188 | /// [`PhantomData`](core::marker::PhantomData) fields. This has the same effect as `#[stor_skip]` [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 188 | /// [`PhantomData`](core::marker::PhantomData) fields. This has the same effect as `#[stor_skip]` [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> derived/src/lib.rs:189:5 [INFO] [stdout] | [INFO] [stdout] 189 | /// but it makes it easier to use with the other macros, avoiding the need to write skips for phantom [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 189 | /// but it makes it easier to use with the other macros, avoiding the need to write skips for phantom [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> derived/src/lib.rs:190:5 [INFO] [stdout] | [INFO] [stdout] 190 | /// fields specifically [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 190 | /// fields specifically [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> derived/src/util.rs:16:39 [INFO] [stdout] | [INFO] [stdout] 16 | pub fn get_struct_field_list_any(ast: &DeriveInput) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 16 | pub fn get_struct_field_list_any(ast: &DeriveInput) -> Result, TokenStream> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking derive-examples v0.1.0 (/opt/rustwide/workdir/derive-examples) [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> derive-examples/src/basic.rs:22:16 [INFO] [stdout] | [INFO] [stdout] 22 | const _UNAME: &'static str = _USER.get_name(); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion has a constant value [INFO] [stdout] --> derive-examples/src/const_default.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | assert!(!CONSTABLE.boolean); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider moving this into a const block: `const { assert!(..) }` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> derived/tests/basic.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | assert_eq!(mt.verified, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 45 - assert_eq!(mt.verified, true); [INFO] [stdout] 45 + assert!(mt.verified); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.59s [INFO] running `Command { std: "docker" "inspect" "b1bb644b8d8de20f8a4ae5ee144e12d7bfe86b367a05495e6becd3fbf2200a57", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b1bb644b8d8de20f8a4ae5ee144e12d7bfe86b367a05495e6becd3fbf2200a57", kill_on_drop: false }` [INFO] [stdout] b1bb644b8d8de20f8a4ae5ee144e12d7bfe86b367a05495e6becd3fbf2200a57