Auto merge of #109750 - compiler-errors:deep-reject-less-permissive-num-var, r=lcnr
numeric vars can only be unified with numerical types in deep reject Don't consider numeric vars (int and float vars) to unify with non-numeric types during deep reject. This helps us reject incompatible impls sooner.
This commit is contained in:
commit
276029deae
1 changed files with 4 additions and 0 deletions
|
@ -322,6 +322,10 @@ impl DeepRejectCtxt {
|
|||
TreatParams::AsCandidateKey => true,
|
||||
},
|
||||
|
||||
ty::Infer(ty::IntVar(_)) => impl_ty.is_integral(),
|
||||
|
||||
ty::Infer(ty::FloatVar(_)) => impl_ty.is_floating_point(),
|
||||
|
||||
ty::Infer(_) => true,
|
||||
|
||||
// As we're walking the whole type, it may encounter projections
|
||||
|
|
Loading…
Add table
Reference in a new issue