1
Fork 0
rust/compiler/rustc_infer/src
Matthias Krüger 145e6204bc
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
2023-03-10 19:59:20 +01:00
..
errors Migrate diagnostic 2023-03-03 05:02:34 +00:00
infer Rollup merge of #108947 - compiler-errors:ct-infer-no-shapeshifting, r=BoxyUwU 2023-03-10 19:59:20 +01:00
traits rustc_infer: Consolidate obligation elaboration de-duplication 2023-02-24 11:32:41 +01:00
lib.rs Rollup merge of #108350 - compiler-errors:assoc-type-bound-dogfooding, r=oli-obk 2023-02-23 06:18:07 +01:00