1
Fork 0

Use error constant instead of explicit error handling

This commit is contained in:
Oli Scherer 2025-01-07 12:03:28 +00:00
parent 7833cf7a47
commit 787af97bab
5 changed files with 3 additions and 10 deletions

View file

@ -2456,9 +2456,6 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
LitToConstInput { lit: &lit.node, ty, neg: negated };
let ct = match tcx.lit_to_const(lit_input) {
Ok(c) => c,
Err(LitToConstError::Reported(err)) => {
ty::Const::new_error(tcx, err)
}
Err(LitToConstError::TypeError) => todo!(),
};
(ct, ty)