Skip to content

Commit

Permalink
Rename disabled_nightly_feature to disabled_nightly_features
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Mar 18, 2024
1 parent a49a8eb commit b74fae2
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ impl<'tcx> NonConstOp<'tcx> for FnCallNonConst<'tcx> {
));

if let Some(feature) = feature {
ccx.tcx.disabled_nightly_feature(
ccx.tcx.disabled_nightly_features(
&mut err,
body.source.def_id().as_local().map(|local| ccx.tcx.local_def_id_to_hir_id(local)),
[(String::new(), feature)],
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_analysis/src/astconv/generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fn generic_arg_mismatch_err(
if let GenericParamDefKind::Const { .. } = param.kind {
if matches!(arg, GenericArg::Type(hir::Ty { kind: hir::TyKind::Infer, .. })) {
err.help("const arguments cannot yet be inferred with `_`");
tcx.disabled_nightly_feature(
tcx.disabled_nightly_features(
&mut err,
param.def_id.as_local().map(|local| tcx.local_def_id_to_hir_id(local)),
[(String::new(), sym::generic_arg_infer)],
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_analysis/src/check/wfcheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ fn check_param_wf(tcx: TyCtxt<'_>, param: &hir::GenericParam<'_>) -> Result<(),
Ok(..) => true,
};
if may_suggest_feature {
tcx.disabled_nightly_feature(
tcx.disabled_nightly_features(
&mut diag,
Some(param.hir_id),
[(
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_typeck/src/method/probe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@ impl<'tcx> Pick<'tcx> {
}
_ => {}
}
tcx.disabled_nightly_feature(
tcx.disabled_nightly_features(
lint,
Some(scope_expr_id),
self.unstable_candidates.iter().map(|(candidate, feature)| {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2184,7 +2184,7 @@ impl<'tcx> TyCtxt<'tcx> {
None
}

pub fn disabled_nightly_feature<E: rustc_errors::EmissionGuarantee>(
pub fn disabled_nightly_features<E: rustc_errors::EmissionGuarantee>(
self,
diag: &mut Diag<'_, E>,
hir_id: Option<HirId>,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_passes/src/check_const.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ impl<'tcx> CheckConstVisitor<'tcx> {
//
// FIXME(ecstaticmorse): Maybe this could be incorporated into `feature_err`? This
// is a pretty narrow case, however.
tcx.disabled_nightly_feature(
tcx.disabled_nightly_features(
&mut err,
def_id.map(|id| tcx.local_def_id_to_hir_id(id)),
missing_secondary.into_iter().map(|gate| (String::new(), *gate)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3471,7 +3471,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
}
ObligationCauseCode::TrivialBound => {
err.help("see issue #48214");
tcx.disabled_nightly_feature(
tcx.disabled_nightly_features(
err,
Some(tcx.local_def_id_to_hir_id(body_id)),
[(String::new(), sym::trivial_bounds)],
Expand Down

0 comments on commit b74fae2

Please sign in to comment.