Simplify a pattern.

This commit is contained in:
Nicholas Nethercote 2024-08-28 08:25:52 +10:00
parent 2932e097f4
commit 66b3585145

View File

@ -246,8 +246,7 @@ fn mir_const_qualif(tcx: TyCtxt<'_>, def: LocalDefId) -> ConstQualifs {
// No need to const-check a non-const `fn`.
match const_kind {
Some(ConstContext::Const { .. } | ConstContext::Static(_))
| Some(ConstContext::ConstFn) => {}
Some(ConstContext::Const { .. } | ConstContext::Static(_) | ConstContext::ConstFn) => {}
None => span_bug!(
tcx.def_span(def),
"`mir_const_qualif` should only be called on const fns and const items"