From 17697c78c55ec35ac2ea27459c01aff4e0f7e35b Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Wed, 28 May 2014 14:19:25 +0100 Subject: [PATCH] Doc: `static mut` is unsafe too According to the corresponding section, accessing a mutable static variable requires `unsafe` too, and I believe it counts as as language level feature. Add it to the relevant list in the Unsafety section. --- src/doc/rust.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/doc/rust.md b/src/doc/rust.md index 4ea17e735dfcd..cea66fdcd6c77 100644 --- a/src/doc/rust.md +++ b/src/doc/rust.md @@ -1036,6 +1036,7 @@ Unsafe operations are those that potentially violate the memory-safety guarantee The following language level features cannot be used in the safe subset of Rust: - Dereferencing a [raw pointer](#pointer-types). + - Reading or writing a [mutable static variable](#mutable-statics). - Calling an unsafe function (including an intrinsic or foreign function). ##### Unsafe functions