1
Fork 0

Improve wording of static_mut_ref

Rename `static_mut_ref` lint to `static_mut_refs`.
This commit is contained in:
Obei Sideg 2024-02-17 22:01:56 +03:00
parent eeeb021954
commit 408eeae59d
73 changed files with 783 additions and 460 deletions

View file

@ -89,7 +89,7 @@ declare_lint_pass! {
SINGLE_USE_LIFETIMES,
SOFT_UNSTABLE,
STABLE_FEATURES,
STATIC_MUT_REF,
STATIC_MUT_REFS,
SUSPICIOUS_AUTO_TRAIT_IMPLS,
TEST_UNSTABLE_LINT,
TEXT_DIRECTION_CODEPOINT_IN_COMMENT,
@ -1769,7 +1769,7 @@ declare_lint! {
}
declare_lint! {
/// The `static_mut_ref` lint checks for shared or mutable references
/// The `static_mut_refs` lint checks for shared or mutable references
/// of mutable static inside `unsafe` blocks and `unsafe` functions.
///
/// ### Example
@ -1807,9 +1807,9 @@ declare_lint! {
/// Shared or mutable references of mutable static are almost always a mistake and
/// can lead to undefined behavior and various other problems in your code.
///
/// This lint is "warn" by default on editions up to 2021, from 2024 there is
/// This lint is "warn" by default on editions up to 2021, in 2024 there is
/// a hard error instead.
pub STATIC_MUT_REF,
pub STATIC_MUT_REFS,
Warn,
"shared references or mutable references of mutable static is discouraged",
@future_incompatible = FutureIncompatibleInfo {