-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language team
Description
Code
pub const _: () = {
// ...
};
Current output
empty
Desired output
warning: ...
--> src/bin/main.rs:2:14
|
1 | pub const _: () = {
| ^^^
|
= note: `#[warn(unused_pub)]` on by default
help: remove these parentheses
|
1 - pub const _: () = {
1 + const _: () = {
|
Rationale and extra context
No response
Other cases
Rust Version
rustc 1.90.0-nightly (a00149764 2025-07-14)
binary: rustc
commit-hash: a001497644bc229f1abcc5b2528733386591647f
commit-date: 2025-07-14
host: aarch64-unknown-linux-gnu
release: 1.90.0-nightly
LLVM version: 20.1.8
Anything else?
No response
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language team