@@ -1077,58 +1077,41 @@ pub trait Tuple {}
10771077/// that all fields are also `ConstParamTy`, which implies that recursively, all fields
10781078/// are `StructuralPartialEq`.
10791079#[ lang = "const_param_ty" ]
1080- #[ unstable( feature = "unsized_const_params" , issue = "95174" ) ]
10811080#[ diagnostic:: on_unimplemented( message = "`{Self}` can't be used as a const parameter type" ) ]
10821081#[ allow( multiple_supertrait_upcastable) ]
10831082// We name this differently than the derive macro so that the `adt_const_params` can
10841083// be used independently of `unsized_const_params` without requiring a full path
10851084// to the derive macro every time it is used. This should be renamed on stabilization.
1086- pub trait ConstParamTy_ : StructuralPartialEq + Eq { }
1085+ pub trait ConstParamTy : StructuralPartialEq + Eq { }
10871086
10881087/// Derive macro generating an impl of the trait `ConstParamTy`.
10891088#[ rustc_builtin_macro]
1090- #[ allow_internal_unstable( unsized_const_params) ]
1089+ #[ allow_internal_unstable( unsized_const_params) ] // todo: remove this?
10911090#[ unstable( feature = "adt_const_params" , issue = "95174" ) ]
10921091pub macro ConstParamTy ( $item: item) {
10931092 /* compiler built-in */
10941093}
10951094
1096- #[ lang = "unsized_const_param_ty" ]
1097- #[ unstable( feature = "unsized_const_params" , issue = "95174" ) ]
1098- #[ diagnostic:: on_unimplemented( message = "`{Self}` can't be used as a const parameter type" ) ]
1099- /// A marker for types which can be used as types of `const` generic parameters.
1100- ///
1101- /// Equivalent to [`ConstParamTy_`] except that this is used by
1102- /// the `unsized_const_params` to allow for fake unstable impls.
1103- pub trait UnsizedConstParamTy : StructuralPartialEq + Eq { }
1104-
1105- /// Derive macro generating an impl of the trait `ConstParamTy`.
1106- #[ rustc_builtin_macro]
1107- #[ allow_internal_unstable( unsized_const_params) ]
1108- #[ unstable( feature = "unsized_const_params" , issue = "95174" ) ]
1109- pub macro UnsizedConstParamTy ( $item: item) {
1110- /* compiler built-in */
1111- }
1112-
11131095// FIXME(adt_const_params): handle `ty::FnDef`/`ty::Closure`
11141096marker_impls ! {
11151097 #[ unstable( feature = "adt_const_params" , issue = "95174" ) ]
1116- ConstParamTy_ for
1098+ #[ unstable_feature_bound( adt_const_params) ]
1099+ ConstParamTy for
11171100 usize , u8 , u16 , u32 , u64 , u128 ,
11181101 isize , i8 , i16 , i32 , i64 , i128 ,
11191102 bool ,
11201103 char ,
11211104 ( ) ,
1122- { T : ConstParamTy_ , const N : usize } [ T ; N ] ,
1105+ { T : ConstParamTy , const N : usize } [ T ; N ] ,
11231106}
11241107
11251108marker_impls ! {
11261109 #[ unstable( feature = "unsized_const_params" , issue = "95174" ) ]
11271110 #[ unstable_feature_bound( unsized_const_params) ]
1128- ConstParamTy_ for
1111+ ConstParamTy for
11291112 str ,
1130- { T : ConstParamTy_ } [ T ] ,
1131- { T : ConstParamTy_ + ?Sized } & T ,
1113+ { T : ConstParamTy } [ T ] ,
1114+ { T : ConstParamTy + ?Sized } & T ,
11321115}
11331116
11341117/// A common trait implemented by all function pointers.
0 commit comments