mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +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
47 lines
1.6 KiB
Text
47 lines
1.6 KiB
Text
error: this range is empty so it will yield no values
|
|
--> $DIR/reversed_empty_ranges_fixable.rs:10:5
|
|
|
|
|
LL | (42..=21).for_each(|x| println!("{}", x));
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::reversed-empty-ranges` implied by `-D warnings`
|
|
help: consider using the following if you are attempting to iterate over this range in reverse
|
|
|
|
|
LL | (21..=42).rev().for_each(|x| println!("{}", x));
|
|
| ~~~~~~~~~~~~~~~
|
|
|
|
error: this range is empty so it will yield no values
|
|
--> $DIR/reversed_empty_ranges_fixable.rs:11:13
|
|
|
|
|
LL | let _ = (ANSWER..21).filter(|x| x % 2 == 0).take(10).collect::<Vec<_>>();
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
help: consider using the following if you are attempting to iterate over this range in reverse
|
|
|
|
|
LL | let _ = (21..ANSWER).rev().filter(|x| x % 2 == 0).take(10).collect::<Vec<_>>();
|
|
| ~~~~~~~~~~~~~~~~~~
|
|
|
|
error: this range is empty so it will yield no values
|
|
--> $DIR/reversed_empty_ranges_fixable.rs:13:14
|
|
|
|
|
LL | for _ in -21..=-42 {}
|
|
| ^^^^^^^^^
|
|
|
|
|
help: consider using the following if you are attempting to iterate over this range in reverse
|
|
|
|
|
LL | for _ in (-42..=-21).rev() {}
|
|
| ~~~~~~~~~~~~~~~~~
|
|
|
|
error: this range is empty so it will yield no values
|
|
--> $DIR/reversed_empty_ranges_fixable.rs:14:14
|
|
|
|
|
LL | for _ in 42u32..21u32 {}
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
help: consider using the following if you are attempting to iterate over this range in reverse
|
|
|
|
|
LL | for _ in (21u32..42u32).rev() {}
|
|
| ~~~~~~~~~~~~~~~~~~~~
|
|
|
|
error: aborting due to 4 previous errors
|
|
|