Skip to content

Commit d6fa407

Browse files
committed
Fix rebase fallout
1 parent b52f6f4 commit d6fa407

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/librustc_mir/interpret/intern.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use rustc::ty::layout::LayoutOf;
77
use rustc::ty::{Ty, TyCtxt, ParamEnv, self};
88
use rustc::mir::interpret::{
9-
EvalResult, ErrorHandled,
9+
InterpResult, ErrorHandled,
1010
};
1111
use rustc::hir;
1212
use rustc::hir::def_id::DefId;
@@ -63,7 +63,7 @@ impl<'rt, 'a, 'mir, 'tcx> InternVisitor<'rt, 'a, 'mir, 'tcx> {
6363
&mut self,
6464
ptr: Pointer,
6565
mutability: Mutability,
66-
) -> EvalResult<'tcx, Option<IsStaticOrFn>> {
66+
) -> InterpResult<'tcx, Option<IsStaticOrFn>> {
6767
trace!(
6868
"InternVisitor::intern {:?} with {:?}",
6969
ptr, mutability,
@@ -117,8 +117,8 @@ for
117117
fn visit_aggregate(
118118
&mut self,
119119
mplace: MPlaceTy<'tcx>,
120-
fields: impl Iterator<Item=EvalResult<'tcx, Self::V>>,
121-
) -> EvalResult<'tcx> {
120+
fields: impl Iterator<Item=InterpResult<'tcx, Self::V>>,
121+
) -> InterpResult<'tcx> {
122122
if let Some(def) = mplace.layout.ty.ty_adt_def() {
123123
if Some(def.did) == self.ecx.tcx.lang_items().unsafe_cell_type() {
124124
// We are crossing over an `UnsafeCell`, we can mutate again
@@ -138,7 +138,7 @@ for
138138
self.walk_aggregate(mplace, fields)
139139
}
140140

141-
fn visit_primitive(&mut self, mplace: MPlaceTy<'tcx>) -> EvalResult<'tcx> {
141+
fn visit_primitive(&mut self, mplace: MPlaceTy<'tcx>) -> InterpResult<'tcx> {
142142
// Handle Reference types, as these are the only relocations supported by const eval.
143143
// Raw pointers (and boxes) are handled by the `leftover_relocations` logic.
144144
let ty = mplace.layout.ty;
@@ -245,7 +245,7 @@ pub fn intern_const_alloc_recursive(
245245
// FIXME(oli-obk): can we scrap the param env? I think we can, the final value of a const eval
246246
// must always be monomorphic, right?
247247
param_env: ty::ParamEnv<'tcx>,
248-
) -> EvalResult<'tcx> {
248+
) -> InterpResult<'tcx> {
249249
let tcx = ecx.tcx;
250250
let (mutability, base_intern_mode) = match tcx.static_mutability(def_id) {
251251
Some(hir::Mutability::MutImmutable) => (Mutability::Immutable, InternMode::Static),

src/librustc_mir/interpret/place.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ where
677677

678678
if M::enforce_validity(self) {
679679
// Data got changed, better make sure it matches the type!
680-
self.validate_operand(dest.into(), vec![], None, /*const_mode*/ false)?;
680+
self.validate_operand(dest.into(), vec![], None)?;
681681
}
682682

683683
Ok(())

src/librustc_mir/transform/const_prop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
567567
});
568568

569569
if let Some(Ok(imm)) = imm {
570-
match imm {
570+
match *imm {
571571
interpret::Immediate::Scalar(ScalarMaybeUndef::Scalar(scalar)) => {
572572
*rval = Rvalue::Use(
573573
self.operand_from_scalar(scalar, value.layout.ty, source_info.span));

0 commit comments

Comments
 (0)