Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Ved-s opened this issue Jan 27, 2024 · 2 comments
Closed
Labels
A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Ved-s
Copy link

Ved-s commented Jan 27, 2024

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

@Ved-s Ved-s added A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 27, 2024
@chenyukang
Copy link
Member

it just a easter-egg, maybe we don't need to put effort into improving it. 😂
there are some other issues....
#91476 (comment)

@oli-obk
Copy link
Contributor

oli-obk commented Jan 31, 2024

While I think we'd accept a PR if the change is trivial, I don't think we need to track this in an issue

Good find tho 🦀

@oli-obk oli-obk closed this as completed Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants