diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-06-11 13:23:08 +0200 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-06-19 09:52:35 +0200 |
| commit | d6fa4070bea1cf94b6fbab5028057d5604c600ee (patch) | |
| tree | 4aa227f1712fc61f98f02049df4daad30d6a08c0 | |
| parent | b52f6f4ca8a2d04abf2f6481530303c2eabaef18 (diff) | |
| download | rust-d6fa4070bea1cf94b6fbab5028057d5604c600ee.tar.gz rust-d6fa4070bea1cf94b6fbab5028057d5604c600ee.zip | |
Fix rebase fallout
| -rw-r--r-- | src/librustc_mir/interpret/intern.rs | 12 | ||||
| -rw-r--r-- | src/librustc_mir/interpret/place.rs | 2 | ||||
| -rw-r--r-- | src/librustc_mir/transform/const_prop.rs | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/librustc_mir/interpret/intern.rs b/src/librustc_mir/interpret/intern.rs index b55129bd419..a7aee9407a4 100644 --- a/src/librustc_mir/interpret/intern.rs +++ b/src/librustc_mir/interpret/intern.rs @@ -6,7 +6,7 @@ use rustc::ty::layout::LayoutOf; use rustc::ty::{Ty, TyCtxt, ParamEnv, self}; use rustc::mir::interpret::{ - EvalResult, ErrorHandled, + InterpResult, ErrorHandled, }; use rustc::hir; use rustc::hir::def_id::DefId; @@ -63,7 +63,7 @@ impl<'rt, 'a, 'mir, 'tcx> InternVisitor<'rt, 'a, 'mir, 'tcx> { &mut self, ptr: Pointer, mutability: Mutability, - ) -> EvalResult<'tcx, Option<IsStaticOrFn>> { + ) -> InterpResult<'tcx, Option<IsStaticOrFn>> { trace!( "InternVisitor::intern {:?} with {:?}", ptr, mutability, @@ -117,8 +117,8 @@ for fn visit_aggregate( &mut self, mplace: MPlaceTy<'tcx>, - fields: impl Iterator<Item=EvalResult<'tcx, Self::V>>, - ) -> EvalResult<'tcx> { + fields: impl Iterator<Item=InterpResult<'tcx, Self::V>>, + ) -> InterpResult<'tcx> { if let Some(def) = mplace.layout.ty.ty_adt_def() { if Some(def.did) == self.ecx.tcx.lang_items().unsafe_cell_type() { // We are crossing over an `UnsafeCell`, we can mutate again @@ -138,7 +138,7 @@ for self.walk_aggregate(mplace, fields) } - fn visit_primitive(&mut self, mplace: MPlaceTy<'tcx>) -> EvalResult<'tcx> { + fn visit_primitive(&mut self, mplace: MPlaceTy<'tcx>) -> InterpResult<'tcx> { // Handle Reference types, as these are the only relocations supported by const eval. // Raw pointers (and boxes) are handled by the `leftover_relocations` logic. let ty = mplace.layout.ty; @@ -245,7 +245,7 @@ pub fn intern_const_alloc_recursive( // FIXME(oli-obk): can we scrap the param env? I think we can, the final value of a const eval // must always be monomorphic, right? param_env: ty::ParamEnv<'tcx>, -) -> EvalResult<'tcx> { +) -> InterpResult<'tcx> { let tcx = ecx.tcx; let (mutability, base_intern_mode) = match tcx.static_mutability(def_id) { Some(hir::Mutability::MutImmutable) => (Mutability::Immutable, InternMode::Static), diff --git a/src/librustc_mir/interpret/place.rs b/src/librustc_mir/interpret/place.rs index a721cea85a2..1285549015c 100644 --- a/src/librustc_mir/interpret/place.rs +++ b/src/librustc_mir/interpret/place.rs @@ -677,7 +677,7 @@ where if M::enforce_validity(self) { // Data got changed, better make sure it matches the type! - self.validate_operand(dest.into(), vec![], None, /*const_mode*/ false)?; + self.validate_operand(dest.into(), vec![], None)?; } Ok(()) diff --git a/src/librustc_mir/transform/const_prop.rs b/src/librustc_mir/transform/const_prop.rs index 805f15e3747..5b567512a7b 100644 --- a/src/librustc_mir/transform/const_prop.rs +++ b/src/librustc_mir/transform/const_prop.rs @@ -567,7 +567,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> { }); if let Some(Ok(imm)) = imm { - match imm { + match *imm { interpret::Immediate::Scalar(ScalarMaybeUndef::Scalar(scalar)) => { *rval = Rvalue::Use( self.operand_from_scalar(scalar, value.layout.ty, source_info.span)); |
