rename AddressOf -> RawBorrow inside the compiler
This commit is contained in:
@@ -94,7 +94,7 @@ where
|
||||
match rvalue {
|
||||
// We ignore fake borrows as these get removed after analysis and shouldn't effect
|
||||
// the layout of generators.
|
||||
Rvalue::AddressOf(_, borrowed_place)
|
||||
Rvalue::RawPtr(_, borrowed_place)
|
||||
| Rvalue::Ref(_, BorrowKind::Mut { .. } | BorrowKind::Shared, borrowed_place) => {
|
||||
if !borrowed_place.is_indirect() {
|
||||
self.trans.gen_(borrowed_place.local);
|
||||
|
||||
@@ -351,7 +351,7 @@ impl<'tcx> GenKillAnalysis<'tcx> for MaybeInitializedPlaces<'_, '_, 'tcx> {
|
||||
&& let Some((_, rvalue)) = statement.kind.as_assign()
|
||||
&& let mir::Rvalue::Ref(_, mir::BorrowKind::Mut { .. }, place)
|
||||
// FIXME: Does `&raw const foo` allow mutation? See #90413.
|
||||
| mir::Rvalue::AddressOf(_, place) = rvalue
|
||||
| mir::Rvalue::RawPtr(_, place) = rvalue
|
||||
&& let LookupResult::Exact(mpi) = self.move_data().rev_lookup.find(place.as_ref())
|
||||
{
|
||||
on_all_children_bits(self.move_data(), mpi, |child| {
|
||||
|
||||
@@ -189,13 +189,13 @@ impl DefUse {
|
||||
|
||||
// All other contexts are uses...
|
||||
PlaceContext::MutatingUse(
|
||||
MutatingUseContext::AddressOf
|
||||
MutatingUseContext::RawBorrow
|
||||
| MutatingUseContext::Borrow
|
||||
| MutatingUseContext::Drop
|
||||
| MutatingUseContext::Retag,
|
||||
)
|
||||
| PlaceContext::NonMutatingUse(
|
||||
NonMutatingUseContext::AddressOf
|
||||
NonMutatingUseContext::RawBorrow
|
||||
| NonMutatingUseContext::Copy
|
||||
| NonMutatingUseContext::Inspect
|
||||
| NonMutatingUseContext::Move
|
||||
|
||||
Reference in New Issue
Block a user