diff options
| author | Ziru Niu <zirconium.n@gmail.com> | 2023-05-31 06:25:27 +0800 |
|---|---|---|
| committer | Ziru Niu <zirconium.n@gmail.com> | 2023-06-20 20:55:31 +0800 |
| commit | 8fb4c41f35fee3b224ea87148cb2ae31a9ed4675 (patch) | |
| tree | d1e09f189d7ab22dc9318faca582e99d4e0854ed /compiler/rustc_middle/src/mir/tcx.rs | |
| parent | 6fc0273b5a57eb78cc00841181113fda3e509478 (diff) | |
| download | rust-8fb4c41f35fee3b224ea87148cb2ae31a9ed4675.tar.gz rust-8fb4c41f35fee3b224ea87148cb2ae31a9ed4675.zip | |
merge `BorrowKind::Unique` into `BorrowKind::Mut`
Diffstat (limited to 'compiler/rustc_middle/src/mir/tcx.rs')
| -rw-r--r-- | compiler/rustc_middle/src/mir/tcx.rs | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/compiler/rustc_middle/src/mir/tcx.rs b/compiler/rustc_middle/src/mir/tcx.rs index 4a16abdd4e3..65dff193c80 100644 --- a/compiler/rustc_middle/src/mir/tcx.rs +++ b/compiler/rustc_middle/src/mir/tcx.rs @@ -269,11 +269,6 @@ impl BorrowKind { BorrowKind::Mut { .. } => hir::Mutability::Mut, BorrowKind::Shared => hir::Mutability::Not, - // We have no type corresponding to a unique imm borrow, so - // use `&mut`. It gives all the capabilities of a `&uniq` - // and hence is a safe "over approximation". - BorrowKind::Unique => hir::Mutability::Mut, - // We have no type corresponding to a shallow borrow, so use // `&` as an approximation. BorrowKind::Shallow => hir::Mutability::Not, |
