@@ -1083,7 +1083,7 @@ pub trait Tuple {}
1083
1083
// We name this differently than the derive macro so that the `adt_const_params` can
1084
1084
// be used independently of `unsized_const_params` without requiring a full path
1085
1085
// to the derive macro every time it is used. This should be renamed on stabilization.
1086
- pub trait ConstParamTy_ : UnsizedConstParamTy + StructuralPartialEq + Eq { }
1086
+ pub trait ConstParamTy_ : StructuralPartialEq + Eq { }
1087
1087
1088
1088
/// Derive macro generating an impl of the trait `ConstParamTy`.
1089
1089
#[ rustc_builtin_macro]
@@ -1093,23 +1093,6 @@ pub macro ConstParamTy($item:item) {
1093
1093
/* compiler built-in */
1094
1094
}
1095
1095
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
-
1113
1096
// FIXME(adt_const_params): handle `ty::FnDef`/`ty::Closure`
1114
1097
marker_impls ! {
1115
1098
#[ unstable( feature = "adt_const_params" , issue = "95174" ) ]
@@ -1124,17 +1107,11 @@ marker_impls! {
1124
1107
1125
1108
marker_impls ! {
1126
1109
#[ unstable( feature = "unsized_const_params" , issue = "95174" ) ]
1127
- UnsizedConstParamTy for
1128
- usize , u8 , u16 , u32 , u64 , u128 ,
1129
- isize , i8 , i16 , i32 , i64 , i128 ,
1130
- bool ,
1131
- char ,
1132
- ( ) ,
1133
- { T : UnsizedConstParamTy , const N : usize } [ T ; N ] ,
1134
-
1110
+ #[ unstable_feature_bound( unsized_const_params) ]
1111
+ ConstParamTy_ for
1135
1112
str ,
1136
- { T : UnsizedConstParamTy } [ T ] ,
1137
- { T : UnsizedConstParamTy + ?Sized } & T ,
1113
+ { T : ConstParamTy_ } [ T ] ,
1114
+ { T : ConstParamTy_ + ?Sized } & T ,
1138
1115
}
1139
1116
1140
1117
/// A common trait implemented by all function pointers.
0 commit comments