Auto merge of #111570 - compiler-errors:ct-err, r=BoxyUwU
Rename const error methods for consistency renames `ty::Const`'s methods for creating a `ConstKind::Error` to be in the same naming style as `ty::Ty`'s equivalent methods. r? `@BoxyUwU`
This commit is contained in:
commit
8d18c32b61
11 changed files with 24 additions and 32 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_with_guaranteed(ty, guar))
|
||||
ConstantKind::Ty(tcx.const_error(ty, guar))
|
||||
}
|
||||
Err(LitToConstError::TypeError) => {
|
||||
bug!("encountered type error in `lit_to_mir_constant`")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue