Closed
Description
Summary
related discussions:
- issue #12435
- zulip
- [and don't lint [
mixed_attributes_style
] when mixing docs and other attrs #12486]
Lint Name
mixed_attributes_style
Reproducer
I tried this code:
#[cfg(test)]
mod tests {
#![allow(dead_code)]
}
I saw this happen:
warning: item has both inner and outer attributes
--> src/lib.rs:1:1
|
1 | / #[cfg(test)]
2 | | mod tests {
3 | | #![allow(dead_code)]
| |________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mixed_attributes_style
= note: `#[warn(clippy::mixed_attributes_style)]` on by default
I expected to see this happen:
no warnings, this is a common syntax, doesn't affect readability.
Version
on playground:
Nightly channel
Build using the Nightly version: 1.79.0-nightly
(2024-03-20 1388d7a069d872bcfe5e)
Additional Labels
No response