Skip to content

Commit 1d7192d

Browse files
deep reject only unify numeric var with concrete numeric
1 parent 17c1167 commit 1d7192d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: compiler/rustc_middle/src/ty/fast_reject.rs

+4
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,10 @@ impl DeepRejectCtxt {
321321
TreatParams::AsCandidateKey => true,
322322
},
323323

324+
ty::Infer(ty::IntVar(_)) => impl_ty.is_integral(),
325+
326+
ty::Infer(ty::FloatVar(_)) => impl_ty.is_floating_point(),
327+
324328
ty::Infer(_) => true,
325329

326330
// As we're walking the whole type, it may encounter projections

0 commit comments

Comments
 (0)