Skip to content

Commit 386d0a5

Browse files
committed
Add an always-ambiguous predicate to make sure that we don't accidentlally allow trait resolution to prove false things during coherence
1 parent 80a4699 commit 386d0a5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clippy_utils/src/qualify_min_const_fn.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ pub fn is_min_const_fn<'a, 'tcx>(tcx: TyCtxt<'tcx>, body: &'a Body<'tcx>, msrv:
3737
ty::PredicateKind::ClosureKind(..) => panic!("closure kind predicate on function: {predicate:#?}"),
3838
ty::PredicateKind::Subtype(_) => panic!("subtype predicate on function: {predicate:#?}"),
3939
ty::PredicateKind::Coerce(_) => panic!("coerce predicate on function: {predicate:#?}"),
40+
ty::PredicateKind::Ambiguous => panic!("ambiguous predicate on function: {predicate:#?}"),
4041
}
4142
}
4243
match predicates.parent {

0 commit comments

Comments
 (0)