Valtrees for primitive types are fine.
This commit is contained in:
parent
f6aa3ee7e8
commit
50559ceec4
@ -509,8 +509,9 @@ pub fn is_deterministic(&self) -> bool {
|
|||||||
Const::Ty(c) => match c.kind() {
|
Const::Ty(c) => match c.kind() {
|
||||||
ty::ConstKind::Param(..) => true,
|
ty::ConstKind::Param(..) => true,
|
||||||
// A valtree may be a reference. Valtree references correspond to a
|
// A valtree may be a reference. Valtree references correspond to a
|
||||||
// different allocation each time they are evaluated.
|
// different allocation each time they are evaluated. Valtrees for primitive
|
||||||
ty::ConstKind::Value(_) => false,
|
// types are fine though.
|
||||||
|
ty::ConstKind::Value(_) => c.ty().is_primitive(),
|
||||||
ty::ConstKind::Unevaluated(..) | ty::ConstKind::Expr(..) => false,
|
ty::ConstKind::Unevaluated(..) | ty::ConstKind::Expr(..) => false,
|
||||||
// Should not appear in runtime MIR.
|
// Should not appear in runtime MIR.
|
||||||
ty::ConstKind::Infer(..)
|
ty::ConstKind::Infer(..)
|
||||||
|
Loading…
Reference in New Issue
Block a user