Skip to content

Commit 329cd79

Browse files
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 67c8877 commit 329cd79

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/base.rs

+1
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,7 @@ fn codegen_stmt<'tcx>(
924924
| StatementKind::FakeRead(..)
925925
| StatementKind::Retag { .. }
926926
| StatementKind::PlaceMention(..)
927+
| StatementKind::BackwardIncompatibleDropHint { .. }
927928
| StatementKind::AscribeUserType(..) => {}
928929

929930
StatementKind::Coverage { .. } => unreachable!(),

src/constant.rs

+1
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,7 @@ pub(crate) fn mir_operand_get_const_val<'tcx>(
583583
| StatementKind::PlaceMention(..)
584584
| StatementKind::Coverage(_)
585585
| StatementKind::ConstEvalCounter
586+
| StatementKind::BackwardIncompatibleDropHint { .. }
586587
| StatementKind::Nop => {}
587588
}
588589
}

0 commit comments

Comments
 (0)