Simplify a pattern.
This commit is contained in:
parent
2932e097f4
commit
66b3585145
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user