Only store a LocalDefId in hir::MacroDef.
This commit is contained in:
parent
ff14cac621
commit
c4e7427081
16 changed files with 47 additions and 29 deletions
|
@ -1155,7 +1155,7 @@ impl Visitor<'tcx> for CheckAttrVisitor<'tcx> {
|
|||
|
||||
fn visit_macro_def(&mut self, macro_def: &'tcx hir::MacroDef<'tcx>) {
|
||||
self.check_attributes(
|
||||
macro_def.hir_id,
|
||||
macro_def.hir_id(),
|
||||
macro_def.attrs,
|
||||
¯o_def.span,
|
||||
Target::MacroDef,
|
||||
|
|
|
@ -106,7 +106,7 @@ fn collect<'tcx>(tcx: TyCtxt<'tcx>) -> FxHashMap<Symbol, DefId> {
|
|||
tcx.hir().krate().visit_all_item_likes(&mut collector);
|
||||
|
||||
for m in tcx.hir().krate().exported_macros {
|
||||
collector.observe_item(m.attrs, m.hir_id);
|
||||
collector.observe_item(m.attrs, m.hir_id());
|
||||
}
|
||||
|
||||
collector.items
|
||||
|
|
|
@ -246,7 +246,7 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
|
|||
}
|
||||
|
||||
fn visit_macro_def(&mut self, macro_def: &'v hir::MacroDef<'v>) {
|
||||
self.record("MacroDef", Id::Node(macro_def.hir_id), macro_def);
|
||||
self.record("MacroDef", Id::Node(macro_def.hir_id()), macro_def);
|
||||
hir_visit::walk_macro_def(self, macro_def)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -473,7 +473,7 @@ impl<'a, 'tcx> Visitor<'tcx> for Annotator<'a, 'tcx> {
|
|||
|
||||
fn visit_macro_def(&mut self, md: &'tcx hir::MacroDef<'tcx>) {
|
||||
self.annotate(
|
||||
md.hir_id,
|
||||
md.hir_id(),
|
||||
&md.attrs,
|
||||
md.span,
|
||||
AnnotationKind::Required,
|
||||
|
@ -599,7 +599,7 @@ impl<'tcx> Visitor<'tcx> for MissingStabilityAnnotations<'tcx> {
|
|||
}
|
||||
|
||||
fn visit_macro_def(&mut self, md: &'tcx hir::MacroDef<'tcx>) {
|
||||
self.check_missing_stability(md.hir_id, md.span);
|
||||
self.check_missing_stability(md.hir_id(), md.span);
|
||||
}
|
||||
|
||||
// Note that we don't need to `check_missing_stability` for default generic parameters,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue