Skip to content

Commit

Permalink
introduce a Coerce predicate
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis authored and Mark-Simulacrum committed Aug 19, 2021
1 parent 4123fed commit 5fec618
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions clippy_utils/src/qualify_min_const_fn.rs
Expand Up @@ -36,6 +36,9 @@ pub fn is_min_const_fn(tcx: TyCtxt<'tcx>, body: &'a Body<'tcx>, msrv: Option<&Ru
ty::PredicateKind::ObjectSafe(_) => panic!("object safe predicate on function: {:#?}", predicate),
ty::PredicateKind::ClosureKind(..) => panic!("closure kind predicate on function: {:#?}", predicate),
ty::PredicateKind::Subtype(_) => panic!("subtype predicate on function: {:#?}", predicate),
ty::PredicateKind::Coerce(_) => {
panic!("coerce predicate on function: {:#?}", predicate)
},
ty::PredicateKind::Trait(pred) => {
if Some(pred.def_id()) == tcx.lang_items().sized_trait() {
continue;
Expand Down

0 comments on commit 5fec618

Please sign in to comment.