rust-clippy/tests/ui/mixed_attributes_style.rs

41 lines
616 B
Rust
Raw Normal View History

#![warn(clippy::mixed_attributes_style)]
2024-02-28 16:38:24 +00:00
#![allow(clippy::duplicated_attributes)]
#[allow(unused)] //~ ERROR: item has both inner and outer attributes
fn foo1() {
#![allow(unused)]
}
#[allow(unused)]
#[allow(unused)]
fn foo2() {}
fn foo3() {
#![allow(unused)]
#![allow(unused)]
}
/// linux
//~^ ERROR: item has both inner and outer attributes
fn foo4() {
//! windows
}
/// linux
/// windows
fn foo5() {}
fn foo6() {
//! linux
//! windows
}
#[allow(unused)] //~ ERROR: item has both inner and outer attributes
mod bar {
#![allow(unused)]
}
fn main() {
// test code goes here
}