Skip to content

Commit

Permalink
Add an always-ambiguous predicate to make sure that we don't accident…
Browse files Browse the repository at this point in the history
…lally allow trait resolution to prove false things during coherence
  • Loading branch information
oli-obk committed Nov 21, 2022
1 parent 80a4699 commit 386d0a5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions clippy_utils/src/qualify_min_const_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pub fn is_min_const_fn<'a, 'tcx>(tcx: TyCtxt<'tcx>, body: &'a Body<'tcx>, msrv:
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::Ambiguous => panic!("ambiguous predicate on function: {predicate:#?}"),
}
}
match predicates.parent {
Expand Down

0 comments on commit 386d0a5

Please sign in to comment.