1
Fork 0

Require that const param tys implement ConstParamTy

This commit is contained in:
Boxy 2023-05-16 19:58:54 +01:00 committed by Michael Goulet
parent 642c92e630
commit bbf41279fa
2 changed files with 19 additions and 77 deletions

View file

@ -1,3 +1,5 @@
use crate::marker::ConstParamTy;
/// Are values of a type transmutable into values of another type?
///
/// This trait is implemented on-the-fly by the compiler for types `Src` and `Self` when the bits of
@ -33,6 +35,9 @@ pub struct Assume {
pub validity: bool,
}
#[unstable(feature = "transmutability", issue = "99571")]
impl ConstParamTy for Assume {}
impl Assume {
/// Do not assume that *you* have ensured any safety properties are met.
#[unstable(feature = "transmutability", issue = "99571")]