mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
Remove feature(const_param_ty_trait)
, use adt_const_params
instead
This commit is contained in:
parent
c8844e1337
commit
81a2b856c8
@ -914,36 +914,36 @@ pub trait PointerLike {}
|
|||||||
|
|
||||||
/// A marker for types which can be used as types of `const` generic parameters.
|
/// A marker for types which can be used as types of `const` generic parameters.
|
||||||
#[cfg_attr(not(bootstrap), lang = "const_param_ty")]
|
#[cfg_attr(not(bootstrap), lang = "const_param_ty")]
|
||||||
#[unstable(feature = "const_param_ty_trait", issue = "none")]
|
#[unstable(feature = "adt_const_params", issue = "95174")]
|
||||||
#[rustc_on_unimplemented(message = "`{Self}` can't be used as a const parameter type")]
|
#[rustc_on_unimplemented(message = "`{Self}` can't be used as a const parameter type")]
|
||||||
pub trait ConstParamTy: StructuralEq {}
|
pub trait ConstParamTy: StructuralEq {}
|
||||||
#[unstable(feature = "const_param_ty_trait", issue = "none")]
|
#[unstable(feature = "adt_const_params", issue = "95174")]
|
||||||
impl ConstParamTy for usize {}
|
impl ConstParamTy for usize {}
|
||||||
#[unstable(feature = "const_param_ty_trait", issue = "none")]
|
#[unstable(feature = "adt_const_params", issue = "95174")]
|
||||||
impl ConstParamTy for u8 {}
|
impl ConstParamTy for u8 {}
|
||||||
#[unstable(feature = "const_param_ty_trait", issue = "none")]
|
#[unstable(feature = "adt_const_params", issue = "95174")]
|
||||||
impl ConstParamTy for u16 {}
|
impl ConstParamTy for u16 {}
|
||||||
#[unstable(feature = "const_param_ty_trait", issue = "none")]
|
#[unstable(feature = "adt_const_params", issue = "95174")]
|
||||||
impl ConstParamTy for u32 {}
|
impl ConstParamTy for u32 {}
|
||||||
#[unstable(feature = "const_param_ty_trait", issue = "none")]
|
#[unstable(feature = "adt_const_params", issue = "95174")]
|
||||||
impl ConstParamTy for u64 {}
|
impl ConstParamTy for u64 {}
|
||||||
#[unstable(feature = "const_param_ty_trait", issue = "none")]
|
#[unstable(feature = "adt_const_params", issue = "95174")]
|
||||||
impl ConstParamTy for u128 {}
|
impl ConstParamTy for u128 {}
|
||||||
#[unstable(feature = "const_param_ty_trait", issue = "none")]
|
#[unstable(feature = "adt_const_params", issue = "95174")]
|
||||||
impl ConstParamTy for isize {}
|
impl ConstParamTy for isize {}
|
||||||
#[unstable(feature = "const_param_ty_trait", issue = "none")]
|
#[unstable(feature = "adt_const_params", issue = "95174")]
|
||||||
impl ConstParamTy for i8 {}
|
impl ConstParamTy for i8 {}
|
||||||
#[unstable(feature = "const_param_ty_trait", issue = "none")]
|
#[unstable(feature = "adt_const_params", issue = "95174")]
|
||||||
impl ConstParamTy for i16 {}
|
impl ConstParamTy for i16 {}
|
||||||
#[unstable(feature = "const_param_ty_trait", issue = "none")]
|
#[unstable(feature = "adt_const_params", issue = "95174")]
|
||||||
impl ConstParamTy for i32 {}
|
impl ConstParamTy for i32 {}
|
||||||
#[unstable(feature = "const_param_ty_trait", issue = "none")]
|
#[unstable(feature = "adt_const_params", issue = "95174")]
|
||||||
impl ConstParamTy for i64 {}
|
impl ConstParamTy for i64 {}
|
||||||
#[unstable(feature = "const_param_ty_trait", issue = "none")]
|
#[unstable(feature = "adt_const_params", issue = "95174")]
|
||||||
impl ConstParamTy for i128 {}
|
impl ConstParamTy for i128 {}
|
||||||
#[unstable(feature = "const_param_ty_trait", issue = "none")]
|
#[unstable(feature = "adt_const_params", issue = "95174")]
|
||||||
impl ConstParamTy for bool {}
|
impl ConstParamTy for bool {}
|
||||||
#[unstable(feature = "const_param_ty_trait", issue = "none")]
|
#[unstable(feature = "adt_const_params", issue = "95174")]
|
||||||
impl ConstParamTy for char {}
|
impl ConstParamTy for char {}
|
||||||
|
|
||||||
/// Implementations of `Copy` for primitive types.
|
/// Implementations of `Copy` for primitive types.
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#![feature(const_param_ty_trait)]
|
#![allow(incomplete_features)]
|
||||||
|
#![feature(adt_const_params)]
|
||||||
|
|
||||||
#[derive(PartialEq, Eq)]
|
#[derive(PartialEq, Eq)]
|
||||||
struct NotParam;
|
struct NotParam;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
error[E0204]: the trait `ConstParamTy` may not be implemented for this type
|
error[E0204]: the trait `ConstParamTy` may not be implemented for this type
|
||||||
--> $DIR/const_patam_ty_impl_bad_field.rs:9:36
|
--> $DIR/const_patam_ty_impl_bad_field.rs:10:36
|
||||||
|
|
|
|
||||||
LL | struct CantParam(NotParam);
|
LL | struct CantParam(NotParam);
|
||||||
| -------- this field does not implement `ConstParamTy`
|
| -------- this field does not implement `ConstParamTy`
|
||||||
|
Loading…
Reference in New Issue
Block a user