diff options
| author | Michael Goulet <michael@errs.io> | 2023-03-30 02:13:24 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-03-30 02:13:24 +0000 |
| commit | 1d7192d6ea5a5fdbd90788f41d0e948a4dedeefa (patch) | |
| tree | 2dcdeb6272860be8210b51c1135763007def8733 | |
| parent | 17c11672167827b0dd92c88ef69f24346d1286dd (diff) | |
| download | rust-1d7192d6ea5a5fdbd90788f41d0e948a4dedeefa.tar.gz rust-1d7192d6ea5a5fdbd90788f41d0e948a4dedeefa.zip | |
deep reject only unify numeric var with concrete numeric
| -rw-r--r-- | compiler/rustc_middle/src/ty/fast_reject.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/ty/fast_reject.rs b/compiler/rustc_middle/src/ty/fast_reject.rs index 0a6e94248e6..726689d8446 100644 --- a/compiler/rustc_middle/src/ty/fast_reject.rs +++ b/compiler/rustc_middle/src/ty/fast_reject.rs @@ -321,6 +321,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 |
