Use error constant instead of explicit error handling
This commit is contained in:
parent
7833cf7a47
commit
787af97bab
5 changed files with 3 additions and 10 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue