We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d625019 commit 66b2353Copy full SHA for 66b2353
src/librustc/mir/interpret/mod.rs
@@ -360,7 +360,9 @@ impl<'tcx> AllocMap<'tcx> {
360
id
361
}
362
363
- /// Returns `None` in case the `AllocId` is dangling.
+ /// 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.
366
/// This function exists to allow const eval to detect the difference between evaluation-
367
/// local dangling pointers and allocations in constants/statics.
368
pub fn get(&self, id: AllocId) -> Option<AllocKind<'tcx>> {
0 commit comments