about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/check_consts/check.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_const_eval/src/check_consts/check.rs')
-rw-r--r--compiler/rustc_const_eval/src/check_consts/check.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_const_eval/src/check_consts/check.rs b/compiler/rustc_const_eval/src/check_consts/check.rs
index 576b174369d..c151e8acf92 100644
--- a/compiler/rustc_const_eval/src/check_consts/check.rs
+++ b/compiler/rustc_const_eval/src/check_consts/check.rs
@@ -595,11 +595,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
                     self.const_kind() == hir::ConstContext::Static(hir::Mutability::Mut);
 
                 if !is_allowed && self.place_may_escape(place) {
-                    self.check_op(ops::EscapingMutBorrow(if matches!(rvalue, Rvalue::Ref(..)) {
-                        hir::BorrowKind::Ref
-                    } else {
-                        hir::BorrowKind::Raw
-                    }));
+                    self.check_op(ops::EscapingMutBorrow);
                 }
             }