Added panics
for unreachable states for expectations (RFC 2383)
This commit is contained in:
parent
3414ad9551
commit
4887eb7b2d
2 changed files with 17 additions and 11 deletions
|
@ -20,6 +20,8 @@ pub fn check_expectations(tcx: TyCtxt<'_>) {
|
|||
// holds stable ids
|
||||
if let LintExpectationId::Stable { hir_id, .. } = id {
|
||||
emit_unfulfilled_expectation_lint(tcx, *hir_id, expectation);
|
||||
} else {
|
||||
unreachable!("at this stage all `LintExpectationId`s are stable");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue