]> git.lizzy.rs Git - rust.git/commitdiff
Document runtime static mutation checks
authorOliver Scherer <github35764891676564198441@oli-obk.de>
Tue, 20 Nov 2018 10:11:09 +0000 (11:11 +0100)
committerOliver Scherer <github35764891676564198441@oli-obk.de>
Tue, 20 Nov 2018 10:11:09 +0000 (11:11 +0100)
src/librustc_mir/interpret/machine.rs

index 57640dc48f13fa1c3fda683e360f1048ebbaa205..4d8f40c81301e46572c45711cdf5c0445e392bb0 100644 (file)
@@ -89,7 +89,8 @@ pub trait Machine<'a, 'mir, 'tcx>: Sized {
         Default +
         Clone;
 
-    /// The memory kind to use for copied statics -- or None if those are not supported.
+    /// The memory kind to use for copied statics -- or None if statics should not be mutated
+    /// and thus any such attempt will cause a `ModifiedStatic` error is raised.
     /// Statics are copied under two circumstances: When they are mutated, and when
     /// `static_with_default_tag` or `find_foreign_static` (see below) returns an owned allocation
     /// that is added to the memory so that the work is not done twice.