]> git.lizzy.rs Git - rust.git/commitdiff
Clear up comment
authorOliver Scherer <github35764891676564198441@oli-obk.de>
Tue, 4 Dec 2018 08:58:36 +0000 (09:58 +0100)
committerOliver Scherer <github35764891676564198441@oli-obk.de>
Tue, 4 Dec 2018 08:58:36 +0000 (09:58 +0100)
src/librustc/mir/interpret/mod.rs

index 9708f7c6717f42e7c8c69dd00532f7bfee0c5ad1..2082de51d7e5d10d22d569837723c0b50f7202cd 100644 (file)
@@ -360,7 +360,9 @@ pub fn create_fn_alloc(&mut self, instance: Instance<'tcx>) -> AllocId {
         id
     }
 
-    /// Returns `None` in case the `AllocId` is dangling.
+    /// Returns `None` in case the `AllocId` is dangling. An `EvalContext` can still have a
+    /// local `Allocation` for that `AllocId`, but having such an `AllocId` in a constant is
+    /// illegal and will likely ICE.
     /// This function exists to allow const eval to detect the difference between evaluation-
     /// local dangling pointers and allocations in constants/statics.
     pub fn get(&self, id: AllocId) -> Option<AllocKind<'tcx>> {