Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions compiler/rustc_borrowck/src/def_use.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ pub(crate) fn categorize(context: PlaceContext) -> Option<DefUse> {
PlaceContext::NonMutatingUse(NonMutatingUseContext::RawBorrow) |
PlaceContext::NonMutatingUse(NonMutatingUseContext::Inspect) |
PlaceContext::NonMutatingUse(NonMutatingUseContext::Copy) |
PlaceContext::NonMutatingUse(NonMutatingUseContext::Move) |
PlaceContext::MutatingUse(MutatingUseContext::Retag) => Some(DefUse::Use),
PlaceContext::NonMutatingUse(NonMutatingUseContext::Move) => Some(DefUse::Use),

///////////////////////////////////////////////////////////////////////////
// DROP USES
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_codegen_ssa/src/mir/analyze.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,7 @@ impl<'a, 'b, 'tcx, Bx: BuilderMethods<'b, 'tcx>> Visitor<'tcx> for LocalAnalyzer
}

PlaceContext::NonUse(_)
| PlaceContext::NonMutatingUse(NonMutatingUseContext::PlaceMention)
| PlaceContext::MutatingUse(MutatingUseContext::Retag) => {}
| PlaceContext::NonMutatingUse(NonMutatingUseContext::PlaceMention) => {}

PlaceContext::NonMutatingUse(
NonMutatingUseContext::Copy
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_middle/src/mir/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1354,8 +1354,6 @@ pub enum MutatingUseContext {
/// f(&mut x.y);
/// ```
Projection,
/// Retagging, a "Stacked Borrows" shadow state operation
Retag,
}

#[derive(Copy, Clone, Debug, PartialEq, Eq)]
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_mir_dataflow/src/impls/liveness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ impl DefUse {
PlaceContext::MutatingUse(
MutatingUseContext::RawBorrow
| MutatingUseContext::Borrow
| MutatingUseContext::Drop
| MutatingUseContext::Retag,
| MutatingUseContext::Drop,
)
| PlaceContext::NonMutatingUse(
NonMutatingUseContext::RawBorrow
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_mir_transform/src/deduce_param_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ impl<'tcx> Visitor<'tcx> for DeduceParamAttrs {
MutatingUseContext::Store
| MutatingUseContext::SetDiscriminant
| MutatingUseContext::AsmOutput
| MutatingUseContext::Projection
| MutatingUseContext::Retag) => {
| MutatingUseContext::Projection) => {
self.usage[i] |= UsageSummary::MUTATE;
}
| PlaceContext::NonMutatingUse(NonMutatingUseContext::RawBorrow) => {
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_mir_transform/src/known_panics_lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,6 @@ impl<'tcx> Visitor<'tcx> for CanConstProp {
// whether they'd be fine right now.
MutatingUse(MutatingUseContext::Yield)
| MutatingUse(MutatingUseContext::Drop)
| MutatingUse(MutatingUseContext::Retag)
// These can't ever be propagated under any scheme, as we can't reason about indirect
// mutation.
| NonMutatingUse(NonMutatingUseContext::SharedBorrow)
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_mir_transform/src/liveness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1548,8 +1548,7 @@ impl DefUse {
PlaceContext::MutatingUse(
MutatingUseContext::RawBorrow
| MutatingUseContext::Borrow
| MutatingUseContext::Drop
| MutatingUseContext::Retag,
| MutatingUseContext::Drop,
)
| PlaceContext::NonMutatingUse(
NonMutatingUseContext::RawBorrow
Expand Down
Loading