Inline and remove LoweringContext::handler().

It has a single call site.
This commit is contained in:
Nicholas Nethercote 2023-12-01 13:52:37 +11:00
parent 8be1d253d2
commit 61f93563d8
2 changed files with 2 additions and 6 deletions

View file

@ -54,7 +54,7 @@
use rustc_data_structures::sorted_map::SortedMap;
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_data_structures::sync::Lrc;
use rustc_errors::{DiagnosticArgFromDisplay, Handler, StashKey};
use rustc_errors::{DiagnosticArgFromDisplay, StashKey};
use rustc_hir as hir;
use rustc_hir::def::{DefKind, LifetimeRes, Namespace, PartialRes, PerNS, Res};
use rustc_hir::def_id::{LocalDefId, CRATE_DEF_ID, LOCAL_CRATE};
@ -763,10 +763,6 @@ fn expect_full_res_from_use(&mut self, id: NodeId) -> impl Iterator<Item = Res<N
self.resolver.get_import_res(id).present_items()
}
fn diagnostic(&self) -> &Handler {
self.tcx.sess.diagnostic()
}
/// Reuses the span but adds information like the kind of the desugaring and features that are
/// allowed inside this span.
fn mark_span_with_reason(

View file

@ -139,7 +139,7 @@ pub(crate) fn lower_qpath(
// We should've returned in the for loop above.
self.diagnostic().span_bug(
self.tcx.sess.diagnostic().span_bug(
p.span,
format!(
"lower_qpath: no final extension segment in {}..{}",