Visit place in BackwardIncompatibleDropHint statement
This commit is contained in:
parent
51548ce71f
commit
2f96e784e2
8 changed files with 19 additions and 25 deletions
|
@ -77,6 +77,9 @@ pub(crate) fn categorize(context: PlaceContext) -> Option<DefUse> {
|
|||
// Debug info is neither def nor use.
|
||||
PlaceContext::NonUse(NonUseContext::VarDebugInfo) => None,
|
||||
|
||||
// Backwards incompatible drop hint is not a use, just a marker for linting.
|
||||
PlaceContext::NonUse(NonUseContext::BackwardIncompatibleDropHint) => None,
|
||||
|
||||
PlaceContext::MutatingUse(MutatingUseContext::Deinit | MutatingUseContext::SetDiscriminant) => {
|
||||
bug!("These statements are not allowed in this MIR phase")
|
||||
}
|
||||
|
|
|
@ -1301,7 +1301,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
|
|||
error_reported
|
||||
}
|
||||
|
||||
/// Through #123739, backward incompatible drops (BIDs) are introduced.
|
||||
/// Through #123739, `BackwardIncompatibleDropHint`s (BIDs) are introduced.
|
||||
/// We would like to emit lints whether borrow checking fails at these future drop locations.
|
||||
#[instrument(level = "debug", skip(self, state))]
|
||||
fn check_backward_incompatible_drop(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue