From f98235ed9d8be7a6966764384a99e18ead1195e2 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Tue, 20 Nov 2018 11:11:09 +0100 Subject: [PATCH] Document runtime static mutation checks --- src/librustc_mir/interpret/machine.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/librustc_mir/interpret/machine.rs b/src/librustc_mir/interpret/machine.rs index 57640dc48f13..4d8f40c81301 100644 --- a/src/librustc_mir/interpret/machine.rs +++ b/src/librustc_mir/interpret/machine.rs @@ -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.