Skip to content

Commit 81a2b85

Browse files
committed
Remove feature(const_param_ty_trait), use adt_const_params instead
1 parent c8844e1 commit 81a2b85

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

library/core/src/marker.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -914,36 +914,36 @@ pub trait PointerLike {}
914914

915915
/// A marker for types which can be used as types of `const` generic parameters.
916916
#[cfg_attr(not(bootstrap), lang = "const_param_ty")]
917-
#[unstable(feature = "const_param_ty_trait", issue = "none")]
917+
#[unstable(feature = "adt_const_params", issue = "95174")]
918918
#[rustc_on_unimplemented(message = "`{Self}` can't be used as a const parameter type")]
919919
pub trait ConstParamTy: StructuralEq {}
920-
#[unstable(feature = "const_param_ty_trait", issue = "none")]
920+
#[unstable(feature = "adt_const_params", issue = "95174")]
921921
impl ConstParamTy for usize {}
922-
#[unstable(feature = "const_param_ty_trait", issue = "none")]
922+
#[unstable(feature = "adt_const_params", issue = "95174")]
923923
impl ConstParamTy for u8 {}
924-
#[unstable(feature = "const_param_ty_trait", issue = "none")]
924+
#[unstable(feature = "adt_const_params", issue = "95174")]
925925
impl ConstParamTy for u16 {}
926-
#[unstable(feature = "const_param_ty_trait", issue = "none")]
926+
#[unstable(feature = "adt_const_params", issue = "95174")]
927927
impl ConstParamTy for u32 {}
928-
#[unstable(feature = "const_param_ty_trait", issue = "none")]
928+
#[unstable(feature = "adt_const_params", issue = "95174")]
929929
impl ConstParamTy for u64 {}
930-
#[unstable(feature = "const_param_ty_trait", issue = "none")]
930+
#[unstable(feature = "adt_const_params", issue = "95174")]
931931
impl ConstParamTy for u128 {}
932-
#[unstable(feature = "const_param_ty_trait", issue = "none")]
932+
#[unstable(feature = "adt_const_params", issue = "95174")]
933933
impl ConstParamTy for isize {}
934-
#[unstable(feature = "const_param_ty_trait", issue = "none")]
934+
#[unstable(feature = "adt_const_params", issue = "95174")]
935935
impl ConstParamTy for i8 {}
936-
#[unstable(feature = "const_param_ty_trait", issue = "none")]
936+
#[unstable(feature = "adt_const_params", issue = "95174")]
937937
impl ConstParamTy for i16 {}
938-
#[unstable(feature = "const_param_ty_trait", issue = "none")]
938+
#[unstable(feature = "adt_const_params", issue = "95174")]
939939
impl ConstParamTy for i32 {}
940-
#[unstable(feature = "const_param_ty_trait", issue = "none")]
940+
#[unstable(feature = "adt_const_params", issue = "95174")]
941941
impl ConstParamTy for i64 {}
942-
#[unstable(feature = "const_param_ty_trait", issue = "none")]
942+
#[unstable(feature = "adt_const_params", issue = "95174")]
943943
impl ConstParamTy for i128 {}
944-
#[unstable(feature = "const_param_ty_trait", issue = "none")]
944+
#[unstable(feature = "adt_const_params", issue = "95174")]
945945
impl ConstParamTy for bool {}
946-
#[unstable(feature = "const_param_ty_trait", issue = "none")]
946+
#[unstable(feature = "adt_const_params", issue = "95174")]
947947
impl ConstParamTy for char {}
948948

949949
/// Implementations of `Copy` for primitive types.

tests/ui/const-generics/const_patam_ty_impl_bad_field.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#![feature(const_param_ty_trait)]
1+
#![allow(incomplete_features)]
2+
#![feature(adt_const_params)]
23

34
#[derive(PartialEq, Eq)]
45
struct NotParam;

tests/ui/const-generics/const_patam_ty_impl_bad_field.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0204]: the trait `ConstParamTy` may not be implemented for this type
2-
--> $DIR/const_patam_ty_impl_bad_field.rs:9:36
2+
--> $DIR/const_patam_ty_impl_bad_field.rs:10:36
33
|
44
LL | struct CantParam(NotParam);
55
| -------- this field does not implement `ConstParamTy`

0 commit comments

Comments
 (0)