rust/compiler/rustc_mir_build
Matthias Krüger 0e08d7002b
Rollup merge of #130715 - compiler-errors:mir-build-const-eval, r=BoxyUwU
Replace calls to `ty::Const::{try_}eval` in mir build/pattern analysis

We normalize consts in writeback: #130645. This means that consts are gonna be as normalized as they're ever gonna get in MIR building and pattern analysis. Therefore we can just use `try_to_target_usize` rather than calling `eval_target_usize`.

Regarding the `.expect` calls, I'm not totally certain whether they're correct given rigid unevaluated consts. But this PR shouldn't make *more* ICEs occur; we may have to squash these ICEs when mGCE comes around, tho 😺
2024-09-23 06:45:36 +02:00
..
src Rollup merge of #130715 - compiler-errors:mir-build-const-eval, r=BoxyUwU 2024-09-23 06:45:36 +02:00
Cargo.toml const_to_pat: cleanup leftovers from when we had to deal with non-structural constants 2024-07-18 11:58:16 +02:00
messages.ftl Add a machine-applicable suggestion to "unreachable pattern" 2024-09-13 21:01:29 +02:00