rust/compiler/rustc_trait_selection
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
..
locales errors: generate typed identifiers in each crate 2023-02-22 09:15:53 +00:00
src Rollup merge of #108947 - compiler-errors:ct-infer-no-shapeshifting, r=BoxyUwU 2023-03-10 19:59:20 +01:00
Cargo.toml Multiple candidates with same response is not ambiguous 2023-02-10 00:35:25 +00:00