Use const_error_with_guaranteed more
This commit is contained in:
parent
34115d040b
commit
0f89fb1791
7 changed files with 51 additions and 15 deletions
|
@ -235,7 +235,9 @@ impl<'a, 'tcx> AbstractConstBuilder<'a, 'tcx> {
|
|||
neg,
|
||||
}) {
|
||||
Ok(c) => c,
|
||||
Err(LitToConstError::Reported) => self.tcx.const_error(node.ty),
|
||||
Err(LitToConstError::Reported(guar)) => {
|
||||
self.tcx.const_error_with_guaranteed(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