move ConstValue into mir

this way we have mir::ConstValue and ty::ValTree as reasonably parallel
This commit is contained in:
Ralf Jung
2023-09-16 09:36:22 +02:00
parent be8f5f6e7f
commit 5a0a1ff0cd
34 changed files with 245 additions and 254 deletions

View File

@@ -2,7 +2,6 @@
use crate::infer::canonical::Canonical;
use crate::mir;
use crate::mir::interpret::ConstValue;
use crate::traits;
use crate::ty::fast_reject::SimplifiedType;
use crate::ty::layout::{TyAndLayout, ValidityRequirement};
@@ -369,7 +368,7 @@ impl<'tcx> Key for (ty::Const<'tcx>, FieldIdx) {
}
}
impl<'tcx> Key for (ConstValue<'tcx>, Ty<'tcx>) {
impl<'tcx> Key for (mir::ConstValue<'tcx>, Ty<'tcx>) {
type CacheSelector = DefaultCacheSelector<Self>;
fn default_span(&self, _: TyCtxt<'_>) -> Span {
@@ -377,7 +376,7 @@ impl<'tcx> Key for (ConstValue<'tcx>, Ty<'tcx>) {
}
}
impl<'tcx> Key for mir::interpret::ConstAlloc<'tcx> {
impl<'tcx> Key for mir::ConstAlloc<'tcx> {
type CacheSelector = DefaultCacheSelector<Self>;
fn default_span(&self, _: TyCtxt<'_>) -> Span {