]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/collapsible_if.stderr
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / collapsible_if.stderr
CommitLineData
f20569fa
XL
1error: this `if` statement can be collapsed
2 --> $DIR/collapsible_if.rs:9:5
3 |
4LL | / if x == "hello" {
5LL | | if y == "world" {
6LL | | println!("Hello world!");
7LL | | }
8LL | | }
9 | |_____^
10 |
11 = note: `-D clippy::collapsible-if` implied by `-D warnings`
12help: collapse nested if block
13 |
14LL | if x == "hello" && y == "world" {
15LL | println!("Hello world!");
16LL | }
17 |
18
19error: this `if` statement can be collapsed
20 --> $DIR/collapsible_if.rs:15:5
21 |
22LL | / if x == "hello" || x == "world" {
23LL | | if y == "world" || y == "hello" {
24LL | | println!("Hello world!");
25LL | | }
26LL | | }
27 | |_____^
28 |
29help: collapse nested if block
30 |
31LL | if (x == "hello" || x == "world") && (y == "world" || y == "hello") {
32LL | println!("Hello world!");
33LL | }
34 |
35
36error: this `if` statement can be collapsed
37 --> $DIR/collapsible_if.rs:21:5
38 |
39LL | / if x == "hello" && x == "world" {
40LL | | if y == "world" || y == "hello" {
41LL | | println!("Hello world!");
42LL | | }
43LL | | }
44 | |_____^
45 |
46help: collapse nested if block
47 |
48LL | if x == "hello" && x == "world" && (y == "world" || y == "hello") {
49LL | println!("Hello world!");
50LL | }
51 |
52
53error: this `if` statement can be collapsed
54 --> $DIR/collapsible_if.rs:27:5
55 |
56LL | / if x == "hello" || x == "world" {
57LL | | if y == "world" && y == "hello" {
58LL | | println!("Hello world!");
59LL | | }
60LL | | }
61 | |_____^
62 |
63help: collapse nested if block
64 |
65LL | if (x == "hello" || x == "world") && y == "world" && y == "hello" {
66LL | println!("Hello world!");
67LL | }
68 |
69
70error: this `if` statement can be collapsed
71 --> $DIR/collapsible_if.rs:33:5
72 |
73LL | / if x == "hello" && x == "world" {
74LL | | if y == "world" && y == "hello" {
75LL | | println!("Hello world!");
76LL | | }
77LL | | }
78 | |_____^
79 |
80help: collapse nested if block
81 |
82LL | if x == "hello" && x == "world" && y == "world" && y == "hello" {
83LL | println!("Hello world!");
84LL | }
85 |
86
87error: this `if` statement can be collapsed
88 --> $DIR/collapsible_if.rs:39:5
89 |
90LL | / if 42 == 1337 {
91LL | | if 'a' != 'A' {
92LL | | println!("world!")
93LL | | }
94LL | | }
95 | |_____^
96 |
97help: collapse nested if block
98 |
99LL | if 42 == 1337 && 'a' != 'A' {
100LL | println!("world!")
101LL | }
102 |
103
104error: this `if` statement can be collapsed
105 --> $DIR/collapsible_if.rs:95:5
106 |
107LL | / if x == "hello" {
108LL | | if y == "world" { // Collapsible
109LL | | println!("Hello world!");
110LL | | }
111LL | | }
112 | |_____^
113 |
114help: collapse nested if block
115 |
116LL | if x == "hello" && y == "world" { // Collapsible
117LL | println!("Hello world!");
118LL | }
119 |
120
121error: this `if` statement can be collapsed
122 --> $DIR/collapsible_if.rs:154:5
123 |
124LL | / if matches!(true, true) {
125LL | | if matches!(true, true) {}
126LL | | }
127 | |_____^ help: collapse nested if block: `if matches!(true, true) && matches!(true, true) {}`
128
129error: aborting due to 8 previous errors
130