1
Fork 0

Rollup merge of #130990 - RalfJung:mir-const-normalize, r=compiler-errors

try to get rid of mir::Const::normalize

It was easy to make this compile, let's see if anything breaks...

r? `@compiler-errors`
This commit is contained in:
Matthias Krüger 2024-09-29 20:17:37 +02:00 committed by GitHub
commit a0ae32d6a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 39 deletions

View file

@ -516,9 +516,7 @@ impl<'a, 'tcx> TOFinder<'a, 'tcx> {
// Avoid handling them, though this could be extended in the future.
return;
}
let Some(value) =
value.const_.normalize(self.tcx, self.param_env).try_to_scalar_int()
else {
let Some(value) = value.const_.try_eval_scalar_int(self.tcx, self.param_env) else {
return;
};
let conds = conditions.map(self.arena, |c| Condition {