Skip to content

Commit de0d0cc

Browse files
BoxyUwUcompiler-errors
authored andcommitted
Require that const param tys implement ConstParamTy
1 parent 6ed7117 commit de0d0cc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/src/mem/transmutability.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use crate::marker::ConstParamTy;
2+
13
/// Are values of a type transmutable into values of another type?
24
///
35
/// 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 {
3335
pub validity: bool,
3436
}
3537

38+
#[unstable(feature = "transmutability", issue = "99571")]
39+
impl ConstParamTy for Assume {}
40+
3641
impl Assume {
3742
/// Do not assume that *you* have ensured any safety properties are met.
3843
#[unstable(feature = "transmutability", issue = "99571")]

0 commit comments

Comments
 (0)