about summary refs log tree commit diff
path: root/compiler/rustc_plugin_impl/src/errors.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-03-21 19:00:12 +0100
committerGitHub <noreply@github.com>2023-03-21 19:00:12 +0100
commit081c607b0afb496fa61ab1b66a6615f9ea6ac663 (patch)
treeaff3933c8302508028f0478c97edf0960f25c6f9 /compiler/rustc_plugin_impl/src/errors.rs
parentee330a3ff524852f2cd9c22fc3453a631658a94d (diff)
parent9174edbae9d3f95b9e1d89ebf4921b761e333204 (diff)
downloadrust-081c607b0afb496fa61ab1b66a6615f9ea6ac663.tar.gz
rust-081c607b0afb496fa61ab1b66a6615f9ea6ac663.zip
Rollup merge of #109336 - compiler-errors:constrain-to-ct-err, r=BoxyUwU
Constrain const vars to error if const types are mismatched

When equating two consts of different types, if either are const variables, constrain them to the correct const error kind.

This helps us avoid "successfully" matching a const against an impl signature but leaving unconstrained const vars, which will lead to incremental ICEs when we call const-eval queries during const projection.

Fixes #109296

The second commit in the stack fixes a regression in the first commit where we end up mentioning `[const error]` in an impl overlap error message. I think the error message changes for the better, but I could implement alternative strategies to avoid this without delaying the overlap error message...

r? `@BoxyUwU`
Diffstat (limited to 'compiler/rustc_plugin_impl/src/errors.rs')
0 files changed, 0 insertions, 0 deletions