Skip to content

Commit 66b2353

Browse files
committed
Clear up comment
1 parent d625019 commit 66b2353

File tree

1 file changed

+3
-1
lines changed
  • src/librustc/mir/interpret

1 file changed

+3
-1
lines changed

src/librustc/mir/interpret/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,9 @@ impl<'tcx> AllocMap<'tcx> {
360360
id
361361
}
362362

363-
/// Returns `None` in case the `AllocId` is dangling.
363+
/// Returns `None` in case the `AllocId` is dangling. An `EvalContext` can still have a
364+
/// local `Allocation` for that `AllocId`, but having such an `AllocId` in a constant is
365+
/// illegal and will likely ICE.
364366
/// This function exists to allow const eval to detect the difference between evaluation-
365367
/// local dangling pointers and allocations in constants/statics.
366368
pub fn get(&self, id: AllocId) -> Option<AllocKind<'tcx>> {

0 commit comments

Comments
 (0)