Store a LocalDefId in hir::GenericParam.
This commit is contained in:
parent
e82c08f58e
commit
18482f7b23
19 changed files with 67 additions and 88 deletions
|
@ -411,8 +411,7 @@ impl CheckAttrVisitor<'_> {
|
|||
if let Some(generics) = tcx.hir().get_generics(tcx.hir().local_def_id(hir_id)) {
|
||||
for p in generics.params {
|
||||
let hir::GenericParamKind::Type { .. } = p.kind else { continue };
|
||||
let param_id = tcx.hir().local_def_id(p.hir_id);
|
||||
let default = tcx.object_lifetime_default(param_id);
|
||||
let default = tcx.object_lifetime_default(p.def_id);
|
||||
let repr = match default {
|
||||
ObjectLifetimeDefault::Empty => "BaseDefault".to_owned(),
|
||||
ObjectLifetimeDefault::Static => "'static".to_owned(),
|
||||
|
|
|
@ -500,7 +500,7 @@ impl<'a, 'tcx> Visitor<'tcx> for Annotator<'a, 'tcx> {
|
|||
};
|
||||
|
||||
self.annotate(
|
||||
self.tcx.hir().local_def_id(p.hir_id),
|
||||
p.def_id,
|
||||
p.span,
|
||||
None,
|
||||
kind,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue