Add TyCtxt::is_fn_trait
This commit is contained in:
@@ -489,7 +489,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||
candidates: &mut SelectionCandidateSet<'tcx>,
|
||||
) {
|
||||
// We provide impl of all fn traits for fn pointers.
|
||||
if self.tcx().fn_trait_kind_from_def_id(obligation.predicate.def_id()).is_none() {
|
||||
if !self.tcx().is_fn_trait(obligation.predicate.def_id()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user