about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJannis Christopher Köhl <mail@koehl.dev>2022-11-07 11:01:44 +0100
committerJannis Christopher Köhl <mail@koehl.dev>2022-11-07 11:01:44 +0100
commit3997893ccb56dde4671cf7213faf9581714da402 (patch)
tree6647e3b8c306ce2cedab5480ca05dcba975c66df
parent89f934917da364d1b9e32dc57a085014a6465bfb (diff)
downloadrust-3997893ccb56dde4671cf7213faf9581714da402.tar.gz
rust-3997893ccb56dde4671cf7213faf9581714da402.zip
Fix rebase
-rw-r--r--compiler/rustc_mir_dataflow/src/value_analysis.rs3
-rw-r--r--src/test/mir-opt/issue_101973.inner.ConstProp.diff3
2 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_mir_dataflow/src/value_analysis.rs b/compiler/rustc_mir_dataflow/src/value_analysis.rs
index 2c631a937b6..3472f2a51d2 100644
--- a/compiler/rustc_mir_dataflow/src/value_analysis.rs
+++ b/compiler/rustc_mir_dataflow/src/value_analysis.rs
@@ -53,7 +53,6 @@ use rustc_middle::mir::tcx::PlaceTy;
 use rustc_middle::mir::visit::{PlaceContext, Visitor};
 use rustc_middle::mir::*;
 use rustc_middle::ty::{self, Ty, TyCtxt};
-use rustc_span::DUMMY_SP;
 use rustc_target::abi::VariantIdx;
 
 use crate::lattice::{HasBottom, HasTop};
@@ -694,7 +693,7 @@ impl Map {
         if max_derefs > 0 {
             if let Some(ty::TypeAndMut { ty: deref_ty, .. }) = ty.builtin_deref(false) {
                 // Values behind references can only be tracked if the target is `Freeze`.
-                if deref_ty.is_freeze(tcx.at(DUMMY_SP), param_env) {
+                if deref_ty.is_freeze(tcx, param_env) {
                     projection.push(PlaceElem::Deref);
                     self.register_with_filter_rec(
                         tcx,
diff --git a/src/test/mir-opt/issue_101973.inner.ConstProp.diff b/src/test/mir-opt/issue_101973.inner.ConstProp.diff
index c24abedae92..bce40f277d2 100644
--- a/src/test/mir-opt/issue_101973.inner.ConstProp.diff
+++ b/src/test/mir-opt/issue_101973.inner.ConstProp.diff
@@ -37,7 +37,6 @@
           StorageLive(_4);                 // scope 0 at $DIR/issue_101973.rs:+1:5: +1:17
           StorageLive(_5);                 // scope 0 at $DIR/issue_101973.rs:+1:10: +1:16
           _5 = _1;                         // scope 0 at $DIR/issue_101973.rs:+1:10: +1:16
-          _4 = const 0_u32;                // scope 1 at $DIR/issue_101973.rs:6:19: 6:23
           StorageLive(_12);                // scope 2 at $DIR/issue_101973.rs:7:12: 7:27
           StorageLive(_13);                // scope 2 at $DIR/issue_101973.rs:7:12: 7:20
           StorageLive(_14);                // scope 2 at $DIR/issue_101973.rs:7:13: 7:14
@@ -73,7 +72,7 @@
           StorageDead(_14);                // scope 2 at $DIR/issue_101973.rs:7:19: 7:20
           _12 = BitAnd(move _13, const 255_u32); // scope 2 at $DIR/issue_101973.rs:7:12: 7:27
           StorageDead(_13);                // scope 2 at $DIR/issue_101973.rs:7:26: 7:27
-          _4 = BitOr(_4, move _12);        // scope 2 at $DIR/issue_101973.rs:7:5: 7:27
+          _4 = BitOr(const 0_u32, move _12); // scope 2 at $DIR/issue_101973.rs:7:5: 7:27
           StorageDead(_12);                // scope 2 at $DIR/issue_101973.rs:7:26: 7:27
           StorageDead(_5);                 // scope 0 at $DIR/issue_101973.rs:+1:16: +1:17
           StorageLive(_6);                 // scope 0 at $DIR/issue_101973.rs:+1:31: +1:57