about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-11-18 14:24:48 +0100
committerRalf Jung <post@ralfj.de>2022-11-18 14:24:48 +0100
commit09a887cebf917af04a45d37d9c39d6bf3072f6e1 (patch)
treea60eb3e5d7a4bcc02b2f906342320407e79cd0be /compiler/rustc_mir_transform
parent410188978622ae80ed051217ec65999e394a3c15 (diff)
downloadrust-09a887cebf917af04a45d37d9c39d6bf3072f6e1.tar.gz
rust-09a887cebf917af04a45d37d9c39d6bf3072f6e1.zip
review feedback
Diffstat (limited to 'compiler/rustc_mir_transform')
-rw-r--r--compiler/rustc_mir_transform/src/const_prop.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_mir_transform/src/const_prop.rs b/compiler/rustc_mir_transform/src/const_prop.rs
index 3420096fe02..b0514e03356 100644
--- a/compiler/rustc_mir_transform/src/const_prop.rs
+++ b/compiler/rustc_mir_transform/src/const_prop.rs
@@ -3,7 +3,7 @@
 
 use std::cell::Cell;
 
-use either::Left;
+use either::Right;
 
 use rustc_ast::Mutability;
 use rustc_data_structures::fx::FxHashSet;
@@ -431,7 +431,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
         // Try to read the local as an immediate so that if it is representable as a scalar, we can
         // handle it as such, but otherwise, just return the value as is.
         Some(match self.ecx.read_immediate_raw(&op) {
-            Ok(Left(imm)) => imm.into(),
+            Ok(Right(imm)) => imm.into(),
             _ => op,
         })
     }
@@ -745,7 +745,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
         // FIXME> figure out what to do when read_immediate_raw fails
         let imm = self.use_ecx(|this| this.ecx.read_immediate_raw(value));
 
-        if let Some(Left(imm)) = imm {
+        if let Some(Right(imm)) = imm {
             match *imm {
                 interpret::Immediate::Scalar(scalar) => {
                     *rval = Rvalue::Use(self.operand_from_scalar(