1
Fork 0

Lint for unused borrows as part of UNUSED_MUST_USE

This commit is contained in:
hi-rustin 2021-06-18 15:09:40 +08:00
parent 1a462831ad
commit 88abd7d81d
18 changed files with 113 additions and 35 deletions

View file

@ -54,7 +54,7 @@ pub fn hash_stable_generic_derive(mut s: synstructure::Structure<'_>) -> proc_ma
quote! {}
} else if let Some(project) = attrs.project {
quote! {
&#bi.#project.hash_stable(__hcx, __hasher);
(&#bi.#project).hash_stable(__hcx, __hasher);
}
} else {
quote! {
@ -96,7 +96,7 @@ pub fn hash_stable_derive(mut s: synstructure::Structure<'_>) -> proc_macro2::To
quote! {}
} else if let Some(project) = attrs.project {
quote! {
&#bi.#project.hash_stable(__hcx, __hasher);
(&#bi.#project).hash_stable(__hcx, __hasher);
}
} else {
quote! {