mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-21 10:33:27 +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
63 lines
1.7 KiB
Text
63 lines
1.7 KiB
Text
error: this loop could be written as a `while let` loop
|
|
--> $DIR/while_let_loop.rs:6:5
|
|
|
|
|
LL | / loop {
|
|
LL | | if let Some(_x) = y {
|
|
LL | | let _v = 1;
|
|
LL | | } else {
|
|
LL | | break;
|
|
LL | | }
|
|
LL | | }
|
|
| |_____^ help: try: `while let Some(_x) = y { .. }`
|
|
|
|
|
= note: `-D clippy::while-let-loop` implied by `-D warnings`
|
|
|
|
error: this loop could be written as a `while let` loop
|
|
--> $DIR/while_let_loop.rs:23:5
|
|
|
|
|
LL | / loop {
|
|
LL | | match y {
|
|
LL | | Some(_x) => true,
|
|
LL | | None => break,
|
|
LL | | };
|
|
LL | | }
|
|
| |_____^ help: try: `while let Some(_x) = y { .. }`
|
|
|
|
error: this loop could be written as a `while let` loop
|
|
--> $DIR/while_let_loop.rs:30:5
|
|
|
|
|
LL | / loop {
|
|
LL | | let x = match y {
|
|
LL | | Some(x) => x,
|
|
LL | | None => break,
|
|
... |
|
|
LL | | let _str = "foo";
|
|
LL | | }
|
|
| |_____^ help: try: `while let Some(x) = y { .. }`
|
|
|
|
error: this loop could be written as a `while let` loop
|
|
--> $DIR/while_let_loop.rs:39:5
|
|
|
|
|
LL | / loop {
|
|
LL | | let x = match y {
|
|
LL | | Some(x) => x,
|
|
LL | | None => break,
|
|
... |
|
|
LL | | }
|
|
LL | | }
|
|
| |_____^ help: try: `while let Some(x) = y { .. }`
|
|
|
|
error: this loop could be written as a `while let` loop
|
|
--> $DIR/while_let_loop.rs:69:5
|
|
|
|
|
LL | / loop {
|
|
LL | | let (e, l) = match "".split_whitespace().next() {
|
|
LL | | Some(word) => (word.is_empty(), word.len()),
|
|
LL | | None => break,
|
|
... |
|
|
LL | | let _ = (e, l);
|
|
LL | | }
|
|
| |_____^ help: try: `while let Some(word) = "".split_whitespace().next() { .. }`
|
|
|
|
error: aborting due to 5 previous errors
|
|
|