diff options
| author | Ralf Jung <post@ralfj.de> | 2024-08-12 10:57:57 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-08-18 19:46:53 +0200 |
| commit | 35709be02d43b40e7f720408f8a88bf6e9d5501d (patch) | |
| tree | 5f4aa6c08afcb38af2c712e7b24cbff7983ceb4d /compiler/rustc_mir_transform/src/ssa.rs | |
| parent | b8464961a2681585a6231b93cd7e85e50022c2b3 (diff) | |
| download | rust-35709be02d43b40e7f720408f8a88bf6e9d5501d.tar.gz rust-35709be02d43b40e7f720408f8a88bf6e9d5501d.zip | |
rename AddressOf -> RawBorrow inside the compiler
Diffstat (limited to 'compiler/rustc_mir_transform/src/ssa.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/ssa.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_mir_transform/src/ssa.rs b/compiler/rustc_mir_transform/src/ssa.rs index fb870425f6e..76591f52625 100644 --- a/compiler/rustc_mir_transform/src/ssa.rs +++ b/compiler/rustc_mir_transform/src/ssa.rs @@ -2,9 +2,9 @@ //! 1/ They are only assigned-to once, either as a function parameter, or in an assign statement; //! 2/ This single assignment dominates all uses; //! -//! As we do not track indirect assignments, a local that has its address taken (either by -//! AddressOf or by borrowing) is considered non-SSA. However, it is UB to modify through an -//! immutable borrow of a `Freeze` local. Those can still be considered to be SSA. +//! As we do not track indirect assignments, a local that has its address taken (via a borrow or raw +//! borrow operator) is considered non-SSA. However, it is UB to modify through an immutable borrow +//! of a `Freeze` local. Those can still be considered to be SSA. use rustc_data_structures::graph::dominators::Dominators; use rustc_index::bit_set::BitSet; @@ -262,7 +262,7 @@ impl<'tcx> Visitor<'tcx> for SsaVisitor<'tcx, '_> { PlaceContext::MutatingUse(MutatingUseContext::Projection) | PlaceContext::NonMutatingUse(NonMutatingUseContext::Projection) => bug!(), // Anything can happen with raw pointers, so remove them. - PlaceContext::NonMutatingUse(NonMutatingUseContext::AddressOf) + PlaceContext::NonMutatingUse(NonMutatingUseContext::RawBorrow) | PlaceContext::MutatingUse(_) => { self.assignments[local] = Set1::Many; } |
