Forbid !Sized
types and references · model-checking/verify-rust-std@857ed93 (original) (raw)
`@@ -995,13 +995,22 @@ marker_impls! {
`
995
995
`isize, i8, i16, i32, i64, i128,
`
996
996
`bool,
`
997
997
`char,
`
998
``
`` -
str /* Technically requires [u8]: ConstParamTy
*/,
``
999
998
`(),
`
1000
999
`{T: ConstParamTy, const N: usize} [T; N],
`
1001
``
`-
{T: ConstParamTy} [T],
`
1002
``
`-
{T: ?Sized + ConstParamTy} &T,
`
1003
1000
`}
`
1004
1001
``
``
1002
`+
#[unstable(feature = "adt_const_params", issue = "95174")]
`
``
1003
`` +
#[rustc_reservation_impl = "types that are not Sized
are not supported as the type of a const generic parameter"]
``
``
1004
`+
impl ConstParamTy for [T] {}
`
``
1005
+
``
1006
`+
#[unstable(feature = "adt_const_params", issue = "95174")]
`
``
1007
`` +
#[rustc_reservation_impl = "types that are not Sized
are not supported as the type of a const generic parameter"]
``
``
1008
`+
impl ConstParamTy for str {}
`
``
1009
+
``
1010
`+
#[unstable(feature = "adt_const_params", issue = "95174")]
`
``
1011
`+
#[rustc_reservation_impl = "references are not supported as the type of a const generic parameter"]
`
``
1012
`+
impl<T: ?Sized> ConstParamTy for &T {}
`
``
1013
+
1005
1014
`/// A common trait implemented by all function pointers.
`
1006
1015
`#[unstable(
`
1007
1016
` feature = "fn_ptr_trait",
`