Skip to content

Make 🦀 -> ferris error suggest uppercase name in static or const declarations #120410

Closed
@Ved-s

Description

@Ved-s

Code

const 🦀: u32 = 5;

mod t {
    static 🦀: u32 = 5;
}

Current output

error: Ferris cannot be used as an identifier
 --> <source>:1:7
  |
1 | const 🦀: u32 = 5;
  |       ^^ help: try using their name instead: `ferris`
...
4 |     static 🦀: u32 = 5;
  |            ^^

Desired output

error: Ferris cannot be used as an identifier
 --> <source>:1:7
  |
1 | const 🦀: u32 = 5;
  |       ^^ help: try using their name instead: `FERRIS`
...
4 |     static 🦀: u32 = 5;
  |            ^^

Rationale and extra context

No response

Other cases

No response

Rust Version

rustc 1.76.0-nightly (eeff92ad3 2023-12-13)
binary: rustc
commit-hash: eeff92ad32c2627876112ccfe812e19d38494087
commit-date: 2023-12-13
host: x86_64-unknown-linux-gnu
release: 1.76.0-nightly
LLVM version: 17.0.5

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions