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
|
@ -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(ty, guar))
|
||||
ConstantKind::Ty(ty::Const::new_error(tcx, guar, ty))
|
||||
}
|
||||
Err(LitToConstError::TypeError) => {
|
||||
bug!("encountered type error in `lit_to_mir_constant`")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue