diff options
author | bors <bors@rust-lang.org> | 2023-05-17 06:42:07 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2023-05-17 06:42:07 +0000 |
commit | c2ccc855e74aec03e434405eca3c247ee2432e53 (patch) | |
tree | 123b2319d3e649afa4438cc57830d30f5c87db1d /library/core/src/marker.rs | |
parent | 6c64870fa67f0227f40f6adc25a6944e95c2959f (diff) | |
parent | 072074383627a6e5eb43c72522ae09010eb218c0 (diff) | |
download | rust-c2ccc855e74aec03e434405eca3c247ee2432e53.tar.gz |
Auto merge of #111671 - Dylan-DPC:rollup-1jy5r16, r=Dylan-DPC
Rollup of 6 pull requests
Successful merges:
- #110145 (Share slice of bytes)
- #111043 (Stabilize feature `cstr_is_empty`)
- #111648 (Remove `LangItems::require`)
- #111649 (Add derive for `core::marker::ConstParamTy`)
- #111654 (Add a conversion from `&mut T` to `&mut UnsafeCell<T>`)
- #111661 (Erase regions of type in `offset_of!`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/core/src/marker.rs')
-rw-r--r-- | library/core/src/marker.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs index 47a3e78b4d5..ca45683d3d6 100644 --- a/library/core/src/marker.rs +++ b/library/core/src/marker.rs @@ -986,6 +986,14 @@ pub trait PointerLike {} #[rustc_on_unimplemented(message = "`{Self}` can't be used as a const parameter type")] pub trait ConstParamTy: StructuralEq {} +/// Derive macro generating an impl of the trait `Copy`. +#[rustc_builtin_macro] +#[unstable(feature = "adt_const_params", issue = "95174")] +#[cfg(not(bootstrap))] +pub macro ConstParamTy($item:item) { + /* compiler built-in */ +} + // FIXME(generic_const_parameter_types): handle `ty::FnDef`/`ty::Closure` // FIXME(generic_const_parameter_types): handle `ty::Tuple` marker_impls! { |