From ba542eebc0f6f08a7275e0e0ed57f110bc3461f2 Mon Sep 17 00:00:00 2001 From: Smitty Date: Wed, 30 Jun 2021 09:27:30 -0400 Subject: [PATCH] Rename is_spurious -> is_volatile --- compiler/rustc_middle/src/mir/interpret/error.rs | 2 +- compiler/rustc_mir/src/transform/const_prop.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_middle/src/mir/interpret/error.rs b/compiler/rustc_middle/src/mir/interpret/error.rs index 2e461015b62..e17017f7225 100644 --- a/compiler/rustc_middle/src/mir/interpret/error.rs +++ b/compiler/rustc_middle/src/mir/interpret/error.rs @@ -538,7 +538,7 @@ impl InterpError<'_> { /// Did the error originate from volatile conditons such as the memory available to the /// interpreter? - pub fn is_spurious(&self) -> bool { + pub fn is_volatile(&self) -> bool { matches!(self, InterpError::ResourceExhaustion(ResourceExhaustionInfo::MemoryExhausted)) } } diff --git a/compiler/rustc_mir/src/transform/const_prop.rs b/compiler/rustc_mir/src/transform/const_prop.rs index 3264f16eccd..5ab6b334ed4 100644 --- a/compiler/rustc_mir/src/transform/const_prop.rs +++ b/compiler/rustc_mir/src/transform/const_prop.rs @@ -478,8 +478,8 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> { Ok(op) => Some(op), Err(error) => { let tcx = self.ecx.tcx.at(c.span); - if error.kind().is_spurious() { - // Spurious errors can't be ignored since otherwise the amount of available + if error.kind().is_volatile() { + // Volatile errors can't be ignored since otherwise the amount of available // 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. self.ecx