about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/json.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-03-10 19:59:20 +0100
committerGitHub <noreply@github.com>2023-03-10 19:59:20 +0100
commit145e6204bcca9c085fc6aa155f16a89c3a601eb0 (patch)
tree991b68c802e6c4d2e874668ed992680cc2392721 /compiler/rustc_errors/src/json.rs
parent772b1ce74524854b290191768373c700f7d38c75 (diff)
parentf7146136d79a4fb78c482797e50724bb4483a337 (diff)
downloadrust-145e6204bcca9c085fc6aa155f16a89c3a601eb0.tar.gz
rust-145e6204bcca9c085fc6aa155f16a89c3a601eb0.zip
Rollup merge of #108947 - compiler-errors:ct-infer-no-shapeshifting, r=BoxyUwU
Don't even try to combine consts with incompatible types

~I left a more detailed explanation for why this fixes this issue in the UI test, but in general, we should not try to unify const infer vars and rigid consts if they have incompatible types. That's because we don't want something like a `ConstArgHasType` predicate to suddenly go from passing to failing, or vice versa, due to a shallow resolve.~

1. Use the `type_of` for a parameter in `try_eval_lit_or_param`, instead of the "expected" type from a `WithOptConstParam` def id.
2. Don't combine consts that have incompatible types.

Fixes #108781
Diffstat (limited to 'compiler/rustc_errors/src/json.rs')
0 files changed, 0 insertions, 0 deletions