Add check for ui_testing via promoting parameters from ParseSess to Session

This commit is contained in:
George-lewis
2024-01-10 00:37:30 -05:00
parent b55faad314
commit 36a69e9d39
44 changed files with 188 additions and 233 deletions

View File

@@ -996,7 +996,7 @@ pub(super) fn check_transparent<'tcx>(tcx: TyCtxt<'tcx>, adt: ty::AdtDef<'tcx>)
if adt.is_union() && !tcx.features().transparent_unions {
feature_err(
&tcx.sess.parse_sess,
&tcx.sess,
sym::transparent_unions,
tcx.def_span(adt.did()),
"transparent unions are unstable",
@@ -1128,7 +1128,7 @@ fn check_enum(tcx: TyCtxt<'_>, def_id: LocalDefId) {
if repr_type_ty == tcx.types.i128 || repr_type_ty == tcx.types.u128 {
if !tcx.features().repr128 {
feature_err(
&tcx.sess.parse_sess,
&tcx.sess,
sym::repr128,
tcx.def_span(def_id),
"repr with 128-bit type is unstable",

View File

@@ -293,7 +293,7 @@ fn default_body_is_unstable(
rustc_session::parse::add_feature_diagnostics_for_issue(
&mut err,
&tcx.sess.parse_sess,
&tcx.sess,
feature,
rustc_feature::GateIssue::Library(issue),
false,

View File

@@ -1591,7 +1591,7 @@ fn check_method_receiver<'tcx>(
return Err(if receiver_is_valid(wfcx, span, receiver_ty, self_ty, true) {
// Report error; would have worked with `arbitrary_self_types`.
feature_err(
&tcx.sess.parse_sess,
&tcx.sess,
sym::arbitrary_self_types,
span,
format!(