Avoid lots of hir::HirId{,Map,Set} qualifiers.
Because they're a bit redundant.
This commit is contained in:
@@ -5,7 +5,7 @@ use rustc_hir as hir;
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def_id::{LocalDefId, LocalModDefId};
|
||||
use rustc_hir::intravisit::Visitor;
|
||||
use rustc_hir::{ExprKind, InlineAsmOperand, StmtKind};
|
||||
use rustc_hir::{ExprKind, HirIdSet, InlineAsmOperand, StmtKind};
|
||||
use rustc_middle::query::Providers;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_session::lint::builtin::UNDEFINED_NAKED_FUNCTION_ABI;
|
||||
@@ -94,7 +94,7 @@ fn check_no_patterns(tcx: TyCtxt<'_>, params: &[hir::Param<'_>]) {
|
||||
|
||||
/// Checks that function parameters aren't used in the function body.
|
||||
fn check_no_parameters_use<'tcx>(tcx: TyCtxt<'tcx>, body: &'tcx hir::Body<'tcx>) {
|
||||
let mut params = hir::HirIdSet::default();
|
||||
let mut params = HirIdSet::default();
|
||||
for param in body.params {
|
||||
param.pat.each_binding(|_binding_mode, hir_id, _span, _ident| {
|
||||
params.insert(hir_id);
|
||||
@@ -105,7 +105,7 @@ fn check_no_parameters_use<'tcx>(tcx: TyCtxt<'tcx>, body: &'tcx hir::Body<'tcx>)
|
||||
|
||||
struct CheckParameters<'tcx> {
|
||||
tcx: TyCtxt<'tcx>,
|
||||
params: hir::HirIdSet,
|
||||
params: HirIdSet,
|
||||
}
|
||||
|
||||
impl<'tcx> Visitor<'tcx> for CheckParameters<'tcx> {
|
||||
|
||||
Reference in New Issue
Block a user