From cb4ec1ebdec50bf8ea6fb7b8ebe5c5dbe8009629 Mon Sep 17 00:00:00 2001 From: YXHXianYu <2943003@qq.com> Date: Wed, 6 Sep 2023 00:13:36 +0800 Subject: [PATCH] Fix format in constants.md --- src/custom_types/constants.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/custom_types/constants.md b/src/custom_types/constants.md index 8878ba834e..c060db7345 100644 --- a/src/custom_types/constants.md +++ b/src/custom_types/constants.md @@ -4,7 +4,7 @@ Rust has two different types of constants which can be declared in any scope including global. Both require explicit type annotation: * `const`: An unchangeable value (the common case). -* `static`: A possibly `mut`able variable with [`'static`][static] lifetime. +* `static`: A possibly mutable variable with [`'static`][static] lifetime. The static lifetime is inferred and does not have to be specified. Accessing or modifying a mutable static variable is [`unsafe`][unsafe].