Rename is_spurious -> is_volatile
This commit is contained in:
parent
55379bb7ea
commit
ba542eebc0
2 changed files with 3 additions and 3 deletions
|
@ -538,7 +538,7 @@ impl InterpError<'_> {
|
||||||
|
|
||||||
/// Did the error originate from volatile conditons such as the memory available to the
|
/// Did the error originate from volatile conditons such as the memory available to the
|
||||||
/// interpreter?
|
/// interpreter?
|
||||||
pub fn is_spurious(&self) -> bool {
|
pub fn is_volatile(&self) -> bool {
|
||||||
matches!(self, InterpError::ResourceExhaustion(ResourceExhaustionInfo::MemoryExhausted))
|
matches!(self, InterpError::ResourceExhaustion(ResourceExhaustionInfo::MemoryExhausted))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -478,8 +478,8 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
|
||||||
Ok(op) => Some(op),
|
Ok(op) => Some(op),
|
||||||
Err(error) => {
|
Err(error) => {
|
||||||
let tcx = self.ecx.tcx.at(c.span);
|
let tcx = self.ecx.tcx.at(c.span);
|
||||||
if error.kind().is_spurious() {
|
if error.kind().is_volatile() {
|
||||||
// Spurious errors can't be ignored since otherwise the amount of available
|
// Volatile errors can't be ignored since otherwise the amount of available
|
||||||
// memory influences the result of optimization and the build. The error
|
// memory influences the result of optimization and the build. The error
|
||||||
// doesn't need to be fatal since no code will actually be generated anyways.
|
// doesn't need to be fatal since no code will actually be generated anyways.
|
||||||
self.ecx
|
self.ecx
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue