about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/snippet.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-05-31 08:25:28 +0000
committerbors <bors@rust-lang.org>2023-05-31 08:25:28 +0000
commite29821ff85a2a3000d226f99f62f89464028d5d6 (patch)
tree3b5e7c252534f84ef9b23158de86562dba45cb5d /compiler/rustc_errors/src/snippet.rs
parent617d3d6d722c432cdcbf210e6db55c3bdeafe381 (diff)
parent21cf9ea7ed5f87c905f1548d1855b02ee61b5aec (diff)
downloadrust-e29821ff85a2a3000d226f99f62f89464028d5d6.tar.gz
rust-e29821ff85a2a3000d226f99f62f89464028d5d6.zip
Auto merge of #111623 - BoxyUwU:move_eval_hack, r=compiler-errors
move `super_relate_consts` hack to `normalize_param_env_or_error`

`super_relate_consts` has as hack in it to work around the fact that `normalize_param_env_or_error` is broken. When relating two constants we attempt to evaluate them (aka normalize them). This is not an issue in any way specific to const generics, type aliases also have the same issue as demonstrated in [this code](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=84b6d3956a2c852a04b60782476b56c9).

Since the hack in `super_relate_consts` only exists to make `normalize_param_env_or_error` emit less errors move it to `normalize_param_env_or_error`. This makes `super_relate_consts` act more like the normal plain structural equality its supposed to and should help ensure that the hack doesnt accidentally affect other situations.

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