Skip to content

Naming convention for static mut is not enforced #37145

Closed
@matklad

Description

@matklad

The following program does not report any naming convention warnings:

#![allow(dead_code)]

static mut snake_case: u32 = 0;
static mut camelCase: u32 = 0;
static mut SCREAMING_SNAKE_CASE: u32 = 0;
static mut CapitalizedCamelCase: u32 = 0;

fn main() {}

Looks like only SCREAMING_SNAKE_CASE should be allowed? If I remove muts, I get the warnings. Or have we already deprecated static muts (pre rfc: https://internals.rust-lang.org/t/pre-rfc-remove-static-mut/1437/20) ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions