Box HIR Generics and Impl.

This commit is contained in:
Camille GILLOT 2022-02-05 15:26:49 +01:00
parent 5ffe8a1a90
commit faadd8fd14
3 changed files with 3 additions and 3 deletions

View file

@ -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) {

View file

@ -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,

View file

@ -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),