about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSmittyvb <me@smitop.com>2021-06-30 09:07:47 -0400
committerGitHub <noreply@github.com>2021-06-30 09:07:47 -0400
commit55379bb7ea8ddad827bddc341c3df2038fe4a9fd (patch)
tree34fe7090268d147373c691fd5f2411575cb53e0f
parentd04da1125d8583e7ae85491eb764c19564b2ab19 (diff)
downloadrust-55379bb7ea8ddad827bddc341c3df2038fe4a9fd.tar.gz
rust-55379bb7ea8ddad827bddc341c3df2038fe4a9fd.zip
simplify explanation comment
Co-authored-by: Ralf Jung <post@ralfj.de>
-rw-r--r--compiler/rustc_middle/src/mir/interpret/allocation.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/compiler/rustc_middle/src/mir/interpret/allocation.rs b/compiler/rustc_middle/src/mir/interpret/allocation.rs
index 9bc41da1b46..ea2b104b27b 100644
--- a/compiler/rustc_middle/src/mir/interpret/allocation.rs
+++ b/compiler/rustc_middle/src/mir/interpret/allocation.rs
@@ -130,15 +130,8 @@ impl<Tag> Allocation<Tag> {
             // This results in an error that can happen non-deterministically, since the memory
             // available to the compiler can change between runs. Normally queries are always
             // deterministic. However, we can be non-determinstic here because all uses of const
-            // evaluation do one of:
-            // - error on failure
-            //   - used for static initalizer evalution
-            //   - used for const value evaluation
-            //   - const prop errors on this since otherwise it would generate different code based
-            //     on available memory
-            // - panic on failure to allocate very small sizes
-            //   - actually panicking won't happen since there wouldn't be enough memory to panic
-            //   - used for caller location evaluation
+            // evaluation will make compilation fail (via hard error or ICE) upon
+            // encountering a `MemoryExhausted` error.
             InterpError::ResourceExhaustion(ResourceExhaustionInfo::MemoryExhausted)
         })?;
         bytes.resize(size.bytes_usize(), 0);