diff --git a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs index 7f4ae30aaa160..e87e60f62dc88 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs @@ -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)], diff --git a/compiler/rustc_hir_analysis/src/astconv/generics.rs b/compiler/rustc_hir_analysis/src/astconv/generics.rs index 227e749cd671b..88e5c1b9963bb 100644 --- a/compiler/rustc_hir_analysis/src/astconv/generics.rs +++ b/compiler/rustc_hir_analysis/src/astconv/generics.rs @@ -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)], diff --git a/compiler/rustc_hir_analysis/src/check/wfcheck.rs b/compiler/rustc_hir_analysis/src/check/wfcheck.rs index 3140abd0de19e..e835f6eaf8a9f 100644 --- a/compiler/rustc_hir_analysis/src/check/wfcheck.rs +++ b/compiler/rustc_hir_analysis/src/check/wfcheck.rs @@ -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), [( diff --git a/compiler/rustc_hir_typeck/src/method/probe.rs b/compiler/rustc_hir_typeck/src/method/probe.rs index 7dabf766e83f8..990f530123cf2 100644 --- a/compiler/rustc_hir_typeck/src/method/probe.rs +++ b/compiler/rustc_hir_typeck/src/method/probe.rs @@ -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)| { diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index 1ba3abc566992..98ce435c73616 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -2184,7 +2184,7 @@ impl<'tcx> TyCtxt<'tcx> { None } - pub fn disabled_nightly_feature( + pub fn disabled_nightly_features( self, diag: &mut Diag<'_, E>, hir_id: Option, diff --git a/compiler/rustc_passes/src/check_const.rs b/compiler/rustc_passes/src/check_const.rs index 865577fe45f43..8080216a25236 100644 --- a/compiler/rustc_passes/src/check_const.rs +++ b/compiler/rustc_passes/src/check_const.rs @@ -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)), diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs index 5ea749940f4c9..276425c847ca6 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -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)],