Skip to content

Commit

Permalink
Simplify a pattern.
Browse files Browse the repository at this point in the history
  • Loading branch information
nnethercote committed Aug 30, 2024
1 parent 2932e09 commit 66b3585
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions compiler/rustc_mir_transform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 66b3585

Please sign in to comment.