Skip to content

Commit 55379bb

Browse files
syvbRalfJung
andauthored
simplify explanation comment
Co-authored-by: Ralf Jung <[email protected]>
1 parent d04da11 commit 55379bb

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

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

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,8 @@ impl<Tag> Allocation<Tag> {
130130
// This results in an error that can happen non-deterministically, since the memory
131131
// available to the compiler can change between runs. Normally queries are always
132132
// deterministic. However, we can be non-determinstic here because all uses of const
133-
// evaluation do one of:
134-
// - error on failure
135-
// - used for static initalizer evalution
136-
// - used for const value evaluation
137-
// - const prop errors on this since otherwise it would generate different code based
138-
// on available memory
139-
// - panic on failure to allocate very small sizes
140-
// - actually panicking won't happen since there wouldn't be enough memory to panic
141-
// - used for caller location evaluation
133+
// evaluation will make compilation fail (via hard error or ICE) upon
134+
// encountering a `MemoryExhausted` error.
142135
InterpError::ResourceExhaustion(ResourceExhaustionInfo::MemoryExhausted)
143136
})?;
144137
bytes.resize(size.bytes_usize(), 0);

0 commit comments

Comments
 (0)