Rename GenericArg::id
as GenericArg::hir_id
.
Because `hir_id` is the standard name for methods that return a `HirId` from a HIR node.
This commit is contained in:
parent
ad7b4d5d22
commit
0a52fbe536
@ -280,7 +280,7 @@ impl GenericArg<'_> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn id(&self) -> HirId {
|
||||
pub fn hir_id(&self) -> HirId {
|
||||
match self {
|
||||
GenericArg::Lifetime(l) => l.hir_id,
|
||||
GenericArg::Type(t) => t.hir_id,
|
||||
|
@ -648,7 +648,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
||||
multispan.push_span_label(span_late, note);
|
||||
tcx.struct_span_lint_hir(
|
||||
LATE_BOUND_LIFETIME_ARGUMENTS,
|
||||
args.args[0].id(),
|
||||
args.args[0].hir_id(),
|
||||
multispan,
|
||||
|lint| {
|
||||
lint.build(msg).emit();
|
||||
|
@ -398,7 +398,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
||||
if has_default {
|
||||
tcx.check_optional_stability(
|
||||
param.def_id,
|
||||
Some(arg.id()),
|
||||
Some(arg.hir_id()),
|
||||
arg.span(),
|
||||
None,
|
||||
AllowUnstable::No,
|
||||
|
@ -79,7 +79,7 @@ pub(super) fn opt_const_param_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<
|
||||
args.args
|
||||
.iter()
|
||||
.filter(|arg| arg.is_ty_or_const())
|
||||
.position(|arg| arg.id() == hir_id)
|
||||
.position(|arg| arg.hir_id() == hir_id)
|
||||
})
|
||||
.unwrap_or_else(|| {
|
||||
bug!("no arg matching AnonConst in segment");
|
||||
@ -112,7 +112,7 @@ pub(super) fn opt_const_param_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<
|
||||
args.args
|
||||
.iter()
|
||||
.filter(|arg| arg.is_ty_or_const())
|
||||
.position(|arg| arg.id() == hir_id)
|
||||
.position(|arg| arg.hir_id() == hir_id)
|
||||
})
|
||||
.unwrap_or_else(|| {
|
||||
bug!("no arg matching AnonConst in segment");
|
||||
@ -166,7 +166,7 @@ pub(super) fn opt_const_param_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<
|
||||
args.args
|
||||
.iter()
|
||||
.filter(|arg| arg.is_ty_or_const())
|
||||
.position(|arg| arg.id() == hir_id)
|
||||
.position(|arg| arg.hir_id() == hir_id)
|
||||
.map(|index| (index, seg)).or_else(|| args.bindings
|
||||
.iter()
|
||||
.filter_map(TypeBinding::opt_const)
|
||||
@ -229,7 +229,7 @@ fn get_path_containing_arg_in_pat<'hir>(
|
||||
.iter()
|
||||
.filter_map(|seg| seg.args)
|
||||
.flat_map(|args| args.args)
|
||||
.any(|arg| arg.id() == arg_id)
|
||||
.any(|arg| arg.hir_id() == arg_id)
|
||||
};
|
||||
let mut arg_path = None;
|
||||
pat.walk(|pat| match pat.kind {
|
||||
|
Loading…
x
Reference in New Issue
Block a user