diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2021-09-12 03:44:56 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-12 03:44:56 -0700 |
| commit | f5ac5cadd3d426cbf9a67dfe1c21a7d404cd2423 (patch) | |
| tree | 6309929aa2d74a733e154b06a113e0336801f450 /compiler/rustc_query_impl/src | |
| parent | a8e3afe3720cc4772aa49e1f7f494c60b81f07a1 (diff) | |
| parent | 8295e4a6cfb12ce74c480172c2854f76d1428b8b (diff) | |
| download | rust-f5ac5cadd3d426cbf9a67dfe1c21a7d404cd2423.tar.gz rust-f5ac5cadd3d426cbf9a67dfe1c21a7d404cd2423.zip | |
Rollup merge of #88709 - BoxyUwU:thir-abstract-const, r=lcnr
generic_const_exprs: use thir for abstract consts instead of mir Changes `AbstractConst` building to use `thir` instead of `mir` so that there's less chance of consts unifying when they shouldn't because lowering to mir dropped information (see `abstract-consts-as-cast-5.rs` test) r? `@lcnr`
Diffstat (limited to 'compiler/rustc_query_impl/src')
| -rw-r--r-- | compiler/rustc_query_impl/src/on_disk_cache.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_query_impl/src/on_disk_cache.rs b/compiler/rustc_query_impl/src/on_disk_cache.rs index a54d1556b3e..bfd36bfb2db 100644 --- a/compiler/rustc_query_impl/src/on_disk_cache.rs +++ b/compiler/rustc_query_impl/src/on_disk_cache.rs @@ -9,6 +9,7 @@ use rustc_index::vec::{Idx, IndexVec}; use rustc_middle::dep_graph::{DepNode, DepNodeIndex, SerializedDepNodeIndex}; use rustc_middle::mir::interpret::{AllocDecodingSession, AllocDecodingState}; use rustc_middle::mir::{self, interpret}; +use rustc_middle::thir; use rustc_middle::ty::codec::{RefDecodable, TyDecoder, TyEncoder}; use rustc_middle::ty::{self, Ty, TyCtxt}; use rustc_query_system::dep_graph::DepContext; @@ -921,7 +922,7 @@ impl<'a, 'tcx> Decodable<CacheDecoder<'a, 'tcx>> } } -impl<'a, 'tcx> Decodable<CacheDecoder<'a, 'tcx>> for &'tcx [mir::abstract_const::Node<'tcx>] { +impl<'a, 'tcx> Decodable<CacheDecoder<'a, 'tcx>> for &'tcx [thir::abstract_const::Node<'tcx>] { fn decode(d: &mut CacheDecoder<'a, 'tcx>) -> Result<Self, String> { RefDecodable::decode(d) } |
