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