Move methods from Map
to TyCtxt
, part 5.
This eliminates all methods on `Map`. Actually removing `Map` will occur in a follow-up PR.
This commit is contained in:
parent
0b4a81a4ef
commit
6713f34ee4
75 changed files with 175 additions and 208 deletions
|
@ -1157,7 +1157,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
|
|||
errors::DocInlineOnlyUse {
|
||||
attr_span: meta.span(),
|
||||
item_span: (attr.style() == AttrStyle::Outer)
|
||||
.then(|| self.tcx.hir().span(hir_id)),
|
||||
.then(|| self.tcx.hir_span(hir_id)),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -1179,7 +1179,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
|
|||
errors::DocMaskedOnlyExternCrate {
|
||||
attr_span: meta.span(),
|
||||
item_span: (attr.style() == AttrStyle::Outer)
|
||||
.then(|| self.tcx.hir().span(hir_id)),
|
||||
.then(|| self.tcx.hir_span(hir_id)),
|
||||
},
|
||||
);
|
||||
return;
|
||||
|
@ -1193,7 +1193,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
|
|||
errors::DocMaskedNotExternCrateSelf {
|
||||
attr_span: meta.span(),
|
||||
item_span: (attr.style() == AttrStyle::Outer)
|
||||
.then(|| self.tcx.hir().span(hir_id)),
|
||||
.then(|| self.tcx.hir_span(hir_id)),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
@ -41,8 +41,8 @@ fn report_duplicate_item(
|
|||
original_def_id: DefId,
|
||||
item_def_id: DefId,
|
||||
) {
|
||||
let orig_span = tcx.hir().span_if_local(original_def_id);
|
||||
let duplicate_span = tcx.hir().span_if_local(item_def_id);
|
||||
let orig_span = tcx.hir_span_if_local(original_def_id);
|
||||
let duplicate_span = tcx.hir_span_if_local(item_def_id);
|
||||
tcx.dcx().emit_err(DuplicateDiagnosticItemInCrate {
|
||||
duplicate_span,
|
||||
orig_span,
|
||||
|
|
|
@ -726,7 +726,7 @@ fn stability_index(tcx: TyCtxt<'_>, (): ()) -> Index {
|
|||
|
||||
annotator.annotate(
|
||||
CRATE_DEF_ID,
|
||||
tcx.hir().span(CRATE_HIR_ID),
|
||||
tcx.hir_span(CRATE_HIR_ID),
|
||||
None,
|
||||
AnnotationKind::Required,
|
||||
InheritDeprecation::Yes,
|
||||
|
@ -1099,7 +1099,7 @@ pub fn check_unused_or_stable_features(tcx: TyCtxt<'_>) {
|
|||
if is_staged_api {
|
||||
let effective_visibilities = &tcx.effective_visibilities(());
|
||||
let mut missing = MissingStabilityAnnotations { tcx, effective_visibilities };
|
||||
missing.check_missing_stability(CRATE_DEF_ID, tcx.hir().span(CRATE_HIR_ID));
|
||||
missing.check_missing_stability(CRATE_DEF_ID, tcx.hir_span(CRATE_HIR_ID));
|
||||
tcx.hir_walk_toplevel_module(&mut missing);
|
||||
tcx.hir_visit_all_item_likes_in_crate(&mut missing);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue