mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-01 00:49:30 +00:00
eb3970285b
In order to switch `clippy::uninlined_format_args` from pedantic to style, all existing tests must not raise a warning. I did not want to change the actual tests, so this is a relatively minor change that: * add `#![allow(clippy::uninlined_format_args)]` where needed * normalizes all allow/deny/warn attributes * all allow attributes are grouped together * sorted alphabetically * the `clippy::*` attributes are listed separate from the other ones. * deny and warn attributes are listed before the allowed ones changelog: none
53 lines
782 B
Rust
53 lines
782 B
Rust
#![warn(clippy::items_after_statements)]
|
|
#![allow(clippy::uninlined_format_args)]
|
|
|
|
fn ok() {
|
|
fn foo() {
|
|
println!("foo");
|
|
}
|
|
foo();
|
|
}
|
|
|
|
fn last() {
|
|
foo();
|
|
fn foo() {
|
|
println!("foo");
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
foo();
|
|
fn foo() {
|
|
println!("foo");
|
|
}
|
|
foo();
|
|
}
|
|
|
|
fn mac() {
|
|
let mut a = 5;
|
|
println!("{}", a);
|
|
// do not lint this, because it needs to be after `a`
|
|
macro_rules! b {
|
|
() => {{
|
|
a = 6;
|
|
fn say_something() {
|
|
println!("something");
|
|
}
|
|
}};
|
|
}
|
|
b!();
|
|
println!("{}", a);
|
|
}
|
|
|
|
fn semicolon() {
|
|
struct S {
|
|
a: u32,
|
|
};
|
|
impl S {
|
|
fn new(a: u32) -> Self {
|
|
Self { a }
|
|
}
|
|
}
|
|
|
|
let _ = S::new(3);
|
|
}
|