Remove even more redundant builtin candidates
This commit is contained in:
parent
2835d9d1d3
commit
d97d4ebecc
6 changed files with 96 additions and 138 deletions
|
@ -781,7 +781,11 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
|
|||
);
|
||||
return;
|
||||
}
|
||||
Ok(Some(ImplSource::Closure(_))) => {
|
||||
// Closure: Fn{Once|Mut}
|
||||
Ok(Some(ImplSource::Builtin(_)))
|
||||
if poly_trait_pred.self_ty().skip_binder().is_closure()
|
||||
&& tcx.fn_trait_kind_from_def_id(trait_id).is_some() =>
|
||||
{
|
||||
let ty::Closure(closure_def_id, substs) =
|
||||
*poly_trait_pred.self_ty().no_bound_vars().unwrap().kind()
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue