rust/compiler/rustc_pattern_analysis/src
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
..
rustc Remove print::Pat entirely, replacing it with String 2024-08-11 20:25:03 +10:00
constructor.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
errors.rs Encapsulate the printing of WitnessPat 2024-07-29 14:56:50 +10:00
lib.rs Add warn(unreachable_pub) to rustc_pattern_analysis. 2024-08-29 20:18:44 +10:00
lints.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
pat_column.rs Rename TypeCx -> PatCx 2024-03-13 13:56:38 +01:00
pat.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc.rs Rollup merge of #130715 - compiler-errors:mir-build-const-eval, r=BoxyUwU 2024-09-23 06:45:36 +02:00
usefulness.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00