Rename const error methods for consistency
This commit is contained in:
parent
7d59fa3d23
commit
8e163f9dce
11 changed files with 24 additions and 32 deletions
|
@ -115,9 +115,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_with_guaranteed(node.ty, guar)
|
||||
}
|
||||
Err(LitToConstError::Reported(guar)) => tcx.const_error(node.ty, guar),
|
||||
Err(LitToConstError::TypeError) => {
|
||||
bug!("encountered type error in lit_to_const")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue