diff options
| author | Oli Scherer <github35764891676564198441@oli-obk.de> | 2021-03-30 14:26:40 +0000 |
|---|---|---|
| committer | Oli Scherer <github35764891676564198441@oli-obk.de> | 2021-03-31 10:40:42 +0000 |
| commit | dbacfbc3681622d634233bcf36504ec898f91818 (patch) | |
| tree | 5320c2401ab3f6f60766e029add981d33cb221a0 /compiler/rustc_infer/src | |
| parent | c7c39ce6d07e4d33dc25e07c43f0139c0634b7eb (diff) | |
| download | rust-dbacfbc3681622d634233bcf36504ec898f91818.tar.gz rust-dbacfbc3681622d634233bcf36504ec898f91818.zip | |
Add a new normalization query just for mir constants
Diffstat (limited to 'compiler/rustc_infer/src')
| -rw-r--r-- | compiler/rustc_infer/src/infer/resolve.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_infer/src/infer/resolve.rs b/compiler/rustc_infer/src/infer/resolve.rs index d72be0134fb..48b8ee17594 100644 --- a/compiler/rustc_infer/src/infer/resolve.rs +++ b/compiler/rustc_infer/src/infer/resolve.rs @@ -1,5 +1,6 @@ use super::type_variable::{TypeVariableOrigin, TypeVariableOriginKind}; use super::{FixupError, FixupResult, InferCtxt, Span}; +use rustc_middle::mir; use rustc_middle::ty::fold::{TypeFolder, TypeVisitor}; use rustc_middle::ty::{self, Const, InferConst, Ty, TyCtxt, TypeFoldable}; @@ -46,6 +47,10 @@ impl<'a, 'tcx> TypeFolder<'tcx> for OpportunisticVarResolver<'a, 'tcx> { ct.super_fold_with(self) } } + + fn fold_mir_const(&mut self, constant: mir::ConstantKind<'tcx>) -> mir::ConstantKind<'tcx> { + constant.super_fold_with(self) + } } /// The opportunistic region resolver opportunistically resolves regions |
