mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 23:24:24 +00:00
Box HIR Generics and Impl.
This commit is contained in:
parent
5ffe8a1a90
commit
faadd8fd14
3 changed files with 3 additions and 3 deletions
|
@ -68,7 +68,7 @@ impl<'tcx> LateLintPass<'tcx> for NewWithoutDefault {
|
|||
..
|
||||
}) = item.kind
|
||||
{
|
||||
for assoc_item in items {
|
||||
for assoc_item in *items {
|
||||
if assoc_item.kind == (hir::AssocItemKind::Fn { has_self: false }) {
|
||||
let impl_item = cx.tcx.hir().impl_item(assoc_item.id);
|
||||
if in_external_macro(cx.sess(), impl_item.span) {
|
||||
|
|
|
@ -42,7 +42,7 @@ impl<'tcx> LateLintPass<'tcx> for PartialEqNeImpl {
|
|||
if let Some(eq_trait) = cx.tcx.lang_items().eq_trait();
|
||||
if trait_ref.path.res.def_id() == eq_trait;
|
||||
then {
|
||||
for impl_item in impl_items {
|
||||
for impl_item in *impl_items {
|
||||
if impl_item.ident.name == sym::ne {
|
||||
span_lint_hir(
|
||||
cx,
|
||||
|
|
|
@ -36,7 +36,7 @@ impl<'tcx> LateLintPass<'tcx> for SerdeApi {
|
|||
if did == visit_did {
|
||||
let mut seen_str = None;
|
||||
let mut seen_string = None;
|
||||
for item in items {
|
||||
for item in *items {
|
||||
match item.ident.as_str() {
|
||||
"visit_str" => seen_str = Some(item.span),
|
||||
"visit_string" => seen_string = Some(item.span),
|
||||
|
|
Loading…
Reference in a new issue