Skip to content

uncommon_codepoints is ignored unless specified at crate levelΒ #86824

Open
@Nemo157

Description

@Nemo157

I tried this code:

#[allow(uncommon_codepoints)]
pub mod 𓀄 {
}

I expected to see this happen: warning-free compilation

Instead, this happened:

warning: allow(uncommon_codepoints) is ignored unless specified at crate level
 --> src/lib.rs:1:9
  |
1 | #[allow(uncommon_codepoints)]
  |         ^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_attributes)]` on by default

warning: identifier contains uncommon Unicode codepoints
 --> src/lib.rs:2:9
  |
2 | pub mod 𓀄 {
  |         ^
  |
  = note: `#[warn(uncommon_codepoints)]` on by default

warning: allow(uncommon_codepoints) is ignored unless specified at crate level
 --> src/lib.rs:1:9
  |
1 | #[allow(uncommon_codepoints)]
  |         ^^^^^^^^^^^^^^^^^^^

Meta

Tested on 1.53 stable and 1.55.0-nightly (2021-07-01 7100b31)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-UnicodeArea: UnicodeA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.L-uncommon_codepointsLint: uncommon_codepoints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions