diff options
| author | xFrednet <xFrednet@gmail.com> | 2021-11-25 21:59:55 +0100 |
|---|---|---|
| committer | xFrednet <xFrednet@gmail.com> | 2022-03-02 17:46:11 +0100 |
| commit | 4887eb7b2d0e427a0dbf07bfade329101389e32a (patch) | |
| tree | 99a66b235c44ff2245378a0747057033903642e2 /compiler/rustc_lint/src | |
| parent | 3414ad95517933c40d8e66c14b951ee5ede3e0cb (diff) | |
| download | rust-4887eb7b2d0e427a0dbf07bfade329101389e32a.tar.gz rust-4887eb7b2d0e427a0dbf07bfade329101389e32a.zip | |
Added `panics` for unreachable states for expectations (RFC 2383)
Diffstat (limited to 'compiler/rustc_lint/src')
| -rw-r--r-- | compiler/rustc_lint/src/expect.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/expect.rs b/compiler/rustc_lint/src/expect.rs index 5dcd1f0fbe6..7611b41b97e 100644 --- a/compiler/rustc_lint/src/expect.rs +++ b/compiler/rustc_lint/src/expect.rs @@ -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"); } } } |
