Skip to content

Commit ba542ee

Browse files
committed
Rename is_spurious -> is_volatile
1 parent 55379bb commit ba542ee

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/rustc_middle/src/mir/interpret/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ impl InterpError<'_> {
538538

539539
/// Did the error originate from volatile conditons such as the memory available to the
540540
/// interpreter?
541-
pub fn is_spurious(&self) -> bool {
541+
pub fn is_volatile(&self) -> bool {
542542
matches!(self, InterpError::ResourceExhaustion(ResourceExhaustionInfo::MemoryExhausted))
543543
}
544544
}

compiler/rustc_mir/src/transform/const_prop.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,8 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
478478
Ok(op) => Some(op),
479479
Err(error) => {
480480
let tcx = self.ecx.tcx.at(c.span);
481-
if error.kind().is_spurious() {
482-
// Spurious errors can't be ignored since otherwise the amount of available
481+
if error.kind().is_volatile() {
482+
// Volatile errors can't be ignored since otherwise the amount of available
483483
// memory influences the result of optimization and the build. The error
484484
// doesn't need to be fatal since no code will actually be generated anyways.
485485
self.ecx

0 commit comments

Comments
 (0)