Skip to content

Commit 297b618

Browse files
committedNov 20, 2024
reduce false positives of tail-expr-drop-order from consumed values
take 2 open up coroutines tweak the wordings the lint works up until 2021 We were missing one case, for ADTs, which was causing `Result` to yield incorrect results. only include field spans with significant types deduplicate and eliminate field spans switch to emit spans to impl Drops Co-authored-by: Niko Matsakis <[email protected]> collect drops instead of taking liveness diff apply some suggestions and add explantory notes small fix on the cache let the query recurse through coroutine new suggestion format with extracted variable name fine-tune the drop span and messages bugfix on runtime borrows tweak message wording filter out ecosystem types earlier apply suggestions clippy check lint level at session level further restrict applicability of the lint translate bid into nop for stable mir detect cycle in type structure
1 parent 70e814b commit 297b618

File tree

58 files changed

+2011
-534
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2011
-534
lines changed
 

‎compiler/rustc_borrowck/src/dataflow.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,7 @@ impl<'tcx> rustc_mir_dataflow::Analysis<'tcx> for Borrows<'_, 'tcx> {
641641
| mir::StatementKind::Coverage(..)
642642
| mir::StatementKind::Intrinsic(..)
643643
| mir::StatementKind::ConstEvalCounter
644+
| mir::StatementKind::BackwardIncompatibleDropHint { .. }
644645
| mir::StatementKind::Nop => {}
645646
}
646647
}

‎compiler/rustc_borrowck/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,8 @@ impl<'a, 'tcx> ResultsVisitor<'a, 'tcx, Borrowck<'a, 'tcx>> for MirBorrowckCtxt<
652652
| StatementKind::Coverage(..)
653653
// These do not actually affect borrowck
654654
| StatementKind::ConstEvalCounter
655+
// This do not affect borrowck
656+
| StatementKind::BackwardIncompatibleDropHint { .. }
655657
| StatementKind::StorageLive(..) => {}
656658
StatementKind::StorageDead(local) => {
657659
self.access_place(

0 commit comments

Comments
 (0)
Please sign in to comment.