summary refs log tree commit diff
path: root/compiler/rustc_const_eval
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-05-31 19:26:05 +0000
committerbors <bors@rust-lang.org>2023-05-31 19:26:05 +0000
commit90c541806f23a127002de5b4038be731ba1458ca (patch)
treed3e039dc1ad5b4c1e151ee6af36cd76b61e46330 /compiler/rustc_const_eval
parentd332def19cf07973b736d0c7eb1b690d7c9d945e (diff)
parent4930c02c008211f06482fef848dbf5d459475efb (diff)
downloadrust-1.70.0.tar.gz
rust-1.70.0.zip
Auto merge of #112145 - wesleywiser:backport_112070, r=Mark-Simulacrum 1.70.0
Backport of #112070

Backports #112070 to stable

r? `@Mark-Simulacrum`
Diffstat (limited to 'compiler/rustc_const_eval')
-rw-r--r--compiler/rustc_const_eval/src/transform/check_consts/check.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
index 9dad9479053..55080d94f1d 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
@@ -412,9 +412,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
                         BorrowKind::Shallow => {
                             PlaceContext::NonMutatingUse(NonMutatingUseContext::ShallowBorrow)
                         }
-                        BorrowKind::Unique => {
-                            PlaceContext::NonMutatingUse(NonMutatingUseContext::UniqueBorrow)
-                        }
+                        BorrowKind::Unique => PlaceContext::MutatingUse(MutatingUseContext::Borrow),
                         BorrowKind::Mut { .. } => {
                             PlaceContext::MutatingUse(MutatingUseContext::Borrow)
                         }