diff options
| author | lcnr <rust@lcnr.de> | 2023-05-29 17:15:48 +0200 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2023-05-29 17:15:48 +0200 |
| commit | cfd062341125ae3abbf2e7a7e30cfb1e8ac0c6e3 (patch) | |
| tree | 36843282387ee9dd7e8d11877933e04e366e7acb /compiler/rustc_const_eval/src/transform | |
| parent | 99ff5afeb8717c096a4f153896e0c3856a3934ad (diff) | |
| download | rust-cfd062341125ae3abbf2e7a7e30cfb1e8ac0c6e3.tar.gz rust-cfd062341125ae3abbf2e7a7e30cfb1e8ac0c6e3.zip | |
unique borrows are mutating uses
Diffstat (limited to 'compiler/rustc_const_eval/src/transform')
| -rw-r--r-- | compiler/rustc_const_eval/src/transform/check_consts/check.rs | 4 |
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 138bc3eb74a..57d939747aa 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) } |
