1
Fork 0

Rename const error methods for consistency

This commit is contained in:
Michael Goulet 2023-05-14 20:32:46 +00:00
parent 7d59fa3d23
commit 8e163f9dce
11 changed files with 24 additions and 32 deletions

View file

@ -52,7 +52,7 @@ pub fn as_constant_inner<'tcx>(
match lit_to_mir_constant(tcx, LitToConstInput { lit: &lit.node, ty, neg }) {
Ok(c) => c,
Err(LitToConstError::Reported(guar)) => {
ConstantKind::Ty(tcx.const_error_with_guaranteed(ty, guar))
ConstantKind::Ty(tcx.const_error(ty, guar))
}
Err(LitToConstError::TypeError) => {
bug!("encountered type error in `lit_to_mir_constant`")