Skip to content

Commit 48bd87a

Browse files
authored
Rollup merge of #111649 - Nilstrieb:derive-const-param-ty, r=BoxyUwU
Add derive for `core::marker::ConstParamTy` This makes it easier to implement it for a type, just like `Copy`. `@BoxyUwU` half asked me to add it
2 parents 5f29330 + fce7292 commit 48bd87a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

core/src/marker.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,14 @@ pub trait PointerLike {}
986986
#[rustc_on_unimplemented(message = "`{Self}` can't be used as a const parameter type")]
987987
pub trait ConstParamTy: StructuralEq {}
988988

989+
/// Derive macro generating an impl of the trait `Copy`.
990+
#[rustc_builtin_macro]
991+
#[unstable(feature = "adt_const_params", issue = "95174")]
992+
#[cfg(not(bootstrap))]
993+
pub macro ConstParamTy($item:item) {
994+
/* compiler built-in */
995+
}
996+
989997
// FIXME(generic_const_parameter_types): handle `ty::FnDef`/`ty::Closure`
990998
// FIXME(generic_const_parameter_types): handle `ty::Tuple`
991999
marker_impls! {

0 commit comments

Comments
 (0)