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
|
@ -120,7 +120,6 @@ fn recurse_build<'tcx>(
|
|||
let sp = node.span;
|
||||
match tcx.at(sp).lit_to_const(LitToConstInput { lit: &lit.node, ty: node.ty, neg }) {
|
||||
Ok(c) => c,
|
||||
Err(LitToConstError::Reported(guar)) => ty::Const::new_error(tcx, guar),
|
||||
Err(LitToConstError::TypeError) => {
|
||||
bug!("encountered type error in lit_to_const")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue