]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/if_same_then_else2.stderr
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / if_same_then_else2.stderr
CommitLineData
f20569fa
XL
1error: this `if` has identical blocks
2 --> $DIR/if_same_then_else2.rs:21:12
3 |
4LL | } else {
5 | ____________^
6LL | | //~ ERROR same body as `if` block
7LL | | for _ in &[42] {
8LL | | let bar: &Option<_> = &Some::<u8>(42);
9... |
10LL | | }
11LL | | }
12 | |_____^
13 |
14 = note: `-D clippy::if-same-then-else` implied by `-D warnings`
15note: same as this
16 --> $DIR/if_same_then_else2.rs:12:13
17 |
18LL | if true {
19 | _____________^
20LL | | for _ in &[42] {
21LL | | let foo: &Option<_> = &Some::<u8>(42);
22LL | | if foo.is_some() {
23... |
24LL | | }
25LL | | } else {
26 | |_____^
27
28error: this `if` has identical blocks
29 --> $DIR/if_same_then_else2.rs:35:12
30 |
31LL | } else {
32 | ____________^
33LL | | //~ ERROR same body as `if` block
34LL | | if let Some(a) = Some(42) {}
35LL | | }
36 | |_____^
37 |
38note: same as this
39 --> $DIR/if_same_then_else2.rs:33:13
40 |
41LL | if true {
42 | _____________^
43LL | | if let Some(a) = Some(42) {}
44LL | | } else {
45 | |_____^
46
47error: this `if` has identical blocks
48 --> $DIR/if_same_then_else2.rs:42:12
49 |
50LL | } else {
51 | ____________^
52LL | | //~ ERROR same body as `if` block
53LL | | if let (1, .., 3) = (1, 2, 3) {}
54LL | | }
55 | |_____^
56 |
57note: same as this
58 --> $DIR/if_same_then_else2.rs:40:13
59 |
60LL | if true {
61 | _____________^
62LL | | if let (1, .., 3) = (1, 2, 3) {}
63LL | | } else {
64 | |_____^
65
66error: this `if` has identical blocks
67 --> $DIR/if_same_then_else2.rs:92:12
68 |
69LL | } else {
70 | ____________^
71LL | | //~ ERROR same body as `if` block
72LL | | f32::NAN
73LL | | };
74 | |_____^
75 |
76note: same as this
77 --> $DIR/if_same_then_else2.rs:90:21
78 |
79LL | let _ = if true {
80 | _____________________^
81LL | | f32::NAN
82LL | | } else {
83 | |_____^
84
85error: this `if` has identical blocks
86 --> $DIR/if_same_then_else2.rs:99:12
87 |
88LL | } else {
89 | ____________^
90LL | | //~ ERROR same body as `if` block
91LL | | Ok("foo")?;
92LL | | }
93 | |_____^
94 |
95note: same as this
96 --> $DIR/if_same_then_else2.rs:97:13
97 |
98LL | if true {
99 | _____________^
100LL | | Ok("foo")?;
101LL | | } else {
102 | |_____^
103
104error: this `if` has identical blocks
105 --> $DIR/if_same_then_else2.rs:124:12
106 |
107LL | } else {
108 | ____________^
109LL | | let foo = "";
110LL | | return Ok(&foo[0..]);
111LL | | }
112 | |_____^
113 |
114note: same as this
115 --> $DIR/if_same_then_else2.rs:121:20
116 |
117LL | } else if true {
118 | ____________________^
119LL | | let foo = "";
120LL | | return Ok(&foo[0..]);
121LL | | } else {
122 | |_____^
123
124error: aborting due to 6 previous errors
125