Replace const_error
methods with Const::new_error
This commit is contained in:
parent
ddbc774e74
commit
d30f56dbf2
15 changed files with 66 additions and 59 deletions
|
@ -119,7 +119,7 @@ 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)) => tcx.const_error(node.ty, guar),
|
||||
Err(LitToConstError::Reported(guar)) => ty::Const::new_error(tcx, guar, node.ty),
|
||||
Err(LitToConstError::TypeError) => {
|
||||
bug!("encountered type error in lit_to_const")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue