Add check for ui_testing via promoting parameters from ParseSess
to Session
This commit is contained in:
parent
b55faad314
commit
36a69e9d39
44 changed files with 188 additions and 233 deletions
|
@ -1306,10 +1306,7 @@ impl<'tcx> LateLintPass<'tcx> for UngatedAsyncFnTrackCaller {
|
|||
cx.emit_spanned_lint(
|
||||
UNGATED_ASYNC_FN_TRACK_CALLER,
|
||||
attr.span,
|
||||
BuiltinUngatedAsyncFnTrackCaller {
|
||||
label: span,
|
||||
parse_sess: &cx.tcx.sess.parse_sess,
|
||||
},
|
||||
BuiltinUngatedAsyncFnTrackCaller { label: span, session: &cx.tcx.sess },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -786,7 +786,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
|
|||
if let ast::LitKind::Str(rationale, _) = name_value.kind {
|
||||
if !self.features.lint_reasons {
|
||||
feature_err(
|
||||
&self.sess.parse_sess,
|
||||
&self.sess,
|
||||
sym::lint_reasons,
|
||||
item.span,
|
||||
"lint reasons are experimental",
|
||||
|
@ -1074,7 +1074,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
|
|||
lint.note(fluent::lint_note);
|
||||
rustc_session::parse::add_feature_diagnostics_for_issue(
|
||||
lint,
|
||||
&self.sess.parse_sess,
|
||||
&self.sess,
|
||||
feature,
|
||||
GateIssue::Language,
|
||||
lint_from_cli,
|
||||
|
|
|
@ -13,7 +13,7 @@ use rustc_macros::{LintDiagnostic, Subdiagnostic};
|
|||
use rustc_middle::ty::{
|
||||
inhabitedness::InhabitedPredicate, Clause, PolyExistentialTraitRef, Ty, TyCtxt,
|
||||
};
|
||||
use rustc_session::parse::ParseSess;
|
||||
use rustc_session::Session;
|
||||
use rustc_span::{edition::Edition, sym, symbol::Ident, Span, Symbol};
|
||||
|
||||
use crate::{
|
||||
|
@ -235,7 +235,7 @@ pub struct BuiltinUnstableFeatures;
|
|||
// lint_ungated_async_fn_track_caller
|
||||
pub struct BuiltinUngatedAsyncFnTrackCaller<'a> {
|
||||
pub label: Span,
|
||||
pub parse_sess: &'a ParseSess,
|
||||
pub session: &'a Session,
|
||||
}
|
||||
|
||||
impl<'a> DecorateLint<'a, ()> for BuiltinUngatedAsyncFnTrackCaller<'_> {
|
||||
|
@ -243,7 +243,7 @@ impl<'a> DecorateLint<'a, ()> for BuiltinUngatedAsyncFnTrackCaller<'_> {
|
|||
diag.span_label(self.label, fluent::lint_label);
|
||||
rustc_session::parse::add_feature_diagnostics(
|
||||
diag,
|
||||
self.parse_sess,
|
||||
self.session,
|
||||
sym::async_fn_track_caller,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue