Skip to content

Commit f98235e

Browse files
committed
Document runtime static mutation checks
1 parent 7d5b5ff commit f98235e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustc_mir/interpret/machine.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ pub trait Machine<'a, 'mir, 'tcx>: Sized {
8989
Default +
9090
Clone;
9191

92-
/// The memory kind to use for copied statics -- or None if those are not supported.
92+
/// The memory kind to use for copied statics -- or None if statics should not be mutated
93+
/// and thus any such attempt will cause a `ModifiedStatic` error is raised.
9394
/// Statics are copied under two circumstances: When they are mutated, and when
9495
/// `static_with_default_tag` or `find_foreign_static` (see below) returns an owned allocation
9596
/// that is added to the memory so that the work is not done twice.

0 commit comments

Comments
 (0)