mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
369 lines
9.7 KiB
Text
369 lines
9.7 KiB
Text
error: this block is too nested
|
|
--> $DIR/auxiliary/mod.rs:6:13
|
|
|
|
|
LL | / mod d {
|
|
LL | | mod e {}
|
|
LL | | }
|
|
| |_____________^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
= note: `-D clippy::excessive-nesting` implied by `-D warnings`
|
|
|
|
error: this block is too nested
|
|
--> $DIR/auxiliary/mod.rs:15:7
|
|
|
|
|
LL | {{{}}}
|
|
| ^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:24:21
|
|
|
|
|
LL | let z = {
|
|
| _____________________^
|
|
LL | | let w = { 3 };
|
|
LL | | w
|
|
LL | | };
|
|
| |_____________^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:68:24
|
|
|
|
|
LL | pub fn b() {
|
|
| ________________________^
|
|
LL | | struct C;
|
|
LL | |
|
|
LL | | impl C {
|
|
LL | | pub fn c() {}
|
|
LL | | }
|
|
LL | | }
|
|
| |_____________^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:84:21
|
|
|
|
|
LL | fn cc() {
|
|
| _____________________^
|
|
LL | | let x = { 1 }; // not a warning, but cc is
|
|
LL | | }
|
|
| |_____________^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:88:21
|
|
|
|
|
LL | let x = { 1 }; // warning
|
|
| ^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:101:13
|
|
|
|
|
LL | / pub mod d {
|
|
LL | | pub mod e {
|
|
LL | | pub mod f {}
|
|
LL | | } // not here
|
|
LL | | } // only warning should be here
|
|
| |_____________^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:115:17
|
|
|
|
|
LL | a_but_not({{{{{{{{0}}}}}}}});
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:116:11
|
|
|
|
|
LL | a.a({{{{{{{{{0}}}}}}}}});
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:117:11
|
|
|
|
|
LL | (0, {{{{{{{1}}}}}}});
|
|
| ^^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:121:21
|
|
|
|
|
LL | if true {
|
|
| _____________________^
|
|
LL | | if true {
|
|
LL | | if true {
|
|
LL | |
|
|
LL | | }
|
|
LL | | }
|
|
LL | | }
|
|
| |_____________^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:133:25
|
|
|
|
|
LL | let y = (|| {
|
|
| _________________________^
|
|
LL | | let z = (|| {
|
|
LL | | let w = { 3 };
|
|
LL | | w
|
|
LL | | })();
|
|
LL | | z
|
|
LL | | })();
|
|
| |_____________^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:148:36
|
|
|
|
|
LL | !{boo as u32 + !{boo as u32 + !{boo as u32}}};
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:152:12
|
|
|
|
|
LL | y += {{{{{5}}}}};
|
|
| ^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:153:19
|
|
|
|
|
LL | let z = y + {{{{{{{{{5}}}}}}}}};
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:154:11
|
|
|
|
|
LL | [0, {{{{{{{{{{0}}}}}}}}}}];
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:155:24
|
|
|
|
|
LL | let mut xx = [0; {{{{{{{{100}}}}}}}}];
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:156:10
|
|
|
|
|
LL | xx[{{{{{{{{{{{{{{{{{{{{{{{{3}}}}}}}}}}}}}}}}}}}}}}}}];
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:157:12
|
|
|
|
|
LL | &mut {{{{{{{{{{y}}}}}}}}}};
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:159:16
|
|
|
|
|
LL | for i in {{{{xx}}}} {{{{{{{{}}}}}}}}
|
|
| ^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:159:27
|
|
|
|
|
LL | for i in {{{{xx}}}} {{{{{{{{}}}}}}}}
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:161:27
|
|
|
|
|
LL | while let Some(i) = {{{{{{Some(1)}}}}}} {{{{{{{}}}}}}}
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:161:47
|
|
|
|
|
LL | while let Some(i) = {{{{{{Some(1)}}}}}} {{{{{{{}}}}}}}
|
|
| ^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:163:13
|
|
|
|
|
LL | while {{{{{{{{true}}}}}}}} {{{{{{{{{}}}}}}}}}
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:163:34
|
|
|
|
|
LL | while {{{{{{{{true}}}}}}}} {{{{{{{{{}}}}}}}}}
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:165:22
|
|
|
|
|
LL | let d = D { d: {{{{{{{{{{{{{{{{{{{{{{{3}}}}}}}}}}}}}}}}}}}}}}} };
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:167:7
|
|
|
|
|
LL | {{{{1;}}}}..{{{{{{3}}}}}};
|
|
| ^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:167:19
|
|
|
|
|
LL | {{{{1;}}}}..{{{{{{3}}}}}};
|
|
| ^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:168:7
|
|
|
|
|
LL | {{{{1;}}}}..={{{{{{{{{{{{{{{{{{{{{{{{{{6}}}}}}}}}}}}}}}}}}}}}}}}}};
|
|
| ^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:168:20
|
|
|
|
|
LL | {{{{1;}}}}..={{{{{{{{{{{{{{{{{{{{{{{{{{6}}}}}}}}}}}}}}}}}}}}}}}}}};
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:169:9
|
|
|
|
|
LL | ..{{{{{{{5}}}}}}};
|
|
| ^^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:170:10
|
|
|
|
|
LL | ..={{{{{3}}}}};
|
|
| ^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:171:7
|
|
|
|
|
LL | {{{{{1;}}}}}..;
|
|
| ^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:173:19
|
|
|
|
|
LL | loop { break {{{{1}}}} };
|
|
| ^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:174:12
|
|
|
|
|
LL | loop {{{{{{}}}}}}
|
|
| ^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:176:13
|
|
|
|
|
LL | match {{{{{{true}}}}}} {
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:177:19
|
|
|
|
|
LL | true => {{{{}}}},
|
|
| ^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:178:20
|
|
|
|
|
LL | false => {{{{}}}},
|
|
| ^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:183:13
|
|
|
|
|
LL | / {
|
|
LL | | {
|
|
LL | | println!("warning! :)");
|
|
LL | | }
|
|
LL | | }
|
|
| |_____________^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:193:27
|
|
|
|
|
LL | async fn c() -> u32 {{{{{{{0}}}}}}}
|
|
| ^^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: this block is too nested
|
|
--> $DIR/excessive_nesting.rs:199:7
|
|
|
|
|
LL | {{{{b().await}}}};
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
= help: try refactoring your code to minimize nesting
|
|
|
|
error: aborting due to 41 previous errors
|
|
|