Skip to content

Commit f23ad2d

Browse files
committed
Clean up and add comment
1 parent b006bf7 commit f23ad2d

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

compiler/rustc_hir_analysis/src/check/wfcheck.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,8 +820,6 @@ fn check_param_wf(tcx: TyCtxt<'_>, param: &ty::GenericParamDef) -> Result<(), Er
820820
let def_id = param.def_id.expect_local();
821821

822822
if tcx.features().adt_const_params() {
823-
// fixme: should we get rid of the check for LangItem::ConstParamTy? If yes, how should we check
824-
// if the trait is implemented.
825823
enter_wf_checking_ctxt(tcx, tcx.local_parent(def_id), |wfcx| {
826824
wfcx.register_bound(
827825
ObligationCause::new(span, def_id, ObligationCauseCode::ConstParam(ty)),

compiler/rustc_trait_selection/src/traits/misc.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ pub fn type_allowed_to_implement_const_param_ty<'tcx>(
102102
lang_item: LangItem,
103103
parent_cause: ObligationCause<'tcx>,
104104
) -> Result<(), ConstParamTyImplementationError<'tcx>> {
105-
// FIXME: core panics if remove unsizedconstparamty, figure out why
106105
assert_matches!(lang_item, LangItem::ConstParamTy);
107106
let mut need_unstable_feature_bound = false;
108107

@@ -152,7 +151,7 @@ pub fn type_allowed_to_implement_const_param_ty<'tcx>(
152151
let infcx = tcx.infer_ctxt().build(TypingMode::non_body_analysis());
153152
let ocx = traits::ObligationCtxt::new_with_diagnostics(&infcx);
154153

155-
// FIXME: add a comment here
154+
// Make sure certain types are gated with #[unstable_feature_bound(unsized_const_params)]
156155
if need_unstable_feature_bound {
157156
ocx.register_obligation(Obligation::new(
158157
tcx,

library/core/src/marker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ pub trait ConstParamTy_: StructuralPartialEq + Eq {}
10881088

10891089
/// Derive macro generating an impl of the trait `ConstParamTy`.
10901090
#[rustc_builtin_macro]
1091-
#[allow_internal_unstable(unsized_const_params)] // todo: remove this?
1091+
#[allow_internal_unstable(unsized_const_params)]
10921092
#[unstable(feature = "adt_const_params", issue = "95174")]
10931093
pub macro ConstParamTy($item:item) {
10941094
/* compiler built-in */

0 commit comments

Comments
 (0)