mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
e0c626fbbc
Prevent multiple 'ignored unless specified at crate level' lints. The multiplication happens because we run the same lint three times: * In BuiltinCombinedEarlyLintPass * In BuiltinCombinedPreExpansionLintPass * In shallow_lint_levels_on Only run the lint one time by checking the `lint_added_lints` bool.
16 lines
500 B
Rust
16 lines
500 B
Rust
#![deny(uncommon_codepoints, unused_attributes)]
|
|
|
|
mod foo {
|
|
#![allow(uncommon_codepoints)]
|
|
//~^ ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
|
|
|
|
#[allow(uncommon_codepoints)]
|
|
//~^ ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
|
|
const BAR: f64 = 0.000001;
|
|
|
|
}
|
|
|
|
#[allow(uncommon_codepoints)]
|
|
//~^ ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
|
|
fn main() {
|
|
}
|