@@ -32,7 +32,9 @@ struct SAOnly {
32
32
}
33
33
34
34
impl S {
35
- fn a ( & self ) -> i32 { 0 }
35
+ fn a ( & self ) -> i32 {
36
+ 0
37
+ }
36
38
}
37
39
38
40
fn do_not_give_bad_suggestions_for_this_unusual_expr ( s1 : & S , s2 : & SAOnly ) -> bool {
@@ -50,7 +52,7 @@ fn do_not_give_bad_suggestions_for_this_macro_expr(s1: &S, s2: &SAOnly) -> bool
50
52
c: 1 ,
51
53
d: 1 ,
52
54
}
53
- }
55
+ } ;
54
56
}
55
57
56
58
// This is superficially similar to `buggy_ab_cmp`, but we should not suggest
@@ -162,22 +164,18 @@ fn inside_larger_boolean_expression_with_unsorted_ops(s1: &S, s2: &S) -> bool {
162
164
}
163
165
164
166
struct Nested {
165
- inner : ( ( i32 , ) , ( i32 , ) , ( i32 , ) )
167
+ inner : ( ( i32 , ) , ( i32 , ) , ( i32 , ) ) ,
166
168
}
167
169
168
170
fn changed_middle_ident ( n1 : & Nested , n2 : & Nested ) -> bool {
169
171
// There's no `n2.inner.2.0`
170
- n1. inner . 0 . 0 == n2. inner . 0 . 0
171
- && n1. inner . 1 . 0 == n2. inner . 1 . 0
172
- && n1. inner . 2 . 0 == n2. inner . 1 . 0
172
+ ( n1. inner . 0 ) . 0 == ( n2. inner . 0 ) . 0 && ( n1. inner . 1 ) . 0 == ( n2. inner . 1 ) . 0 && ( n1. inner . 2 ) . 0 == ( n2. inner . 1 ) . 0
173
173
}
174
174
175
175
// `eq_op` should catch this one.
176
176
fn changed_initial_ident ( n1 : & Nested , n2 : & Nested ) -> bool {
177
177
// There's no `n2.inner.0.0`
178
- n1. inner . 0 . 0 == n1. inner . 0 . 0
179
- && n1. inner . 1 . 0 == n2. inner . 1 . 0
180
- && n1. inner . 2 . 0 == n2. inner . 2 . 0
178
+ ( n1. inner . 0 ) . 0 == ( n1. inner . 0 ) . 0 && ( n1. inner . 1 ) . 0 == ( n2. inner . 1 ) . 0 && ( n1. inner . 2 ) . 0 == ( n2. inner . 2 ) . 0
181
179
}
182
180
183
181
fn inside_fn_with_similar_expression ( s1 : & S , s2 : & S , strict : bool ) -> bool {
@@ -203,11 +201,7 @@ fn maximum_unary_minus_right_tree(s1: &S, s2: &S) -> i32 {
203
201
204
202
fn unary_minus_and_an_if_expression ( s1 : & S , s2 : & S ) -> i32 {
205
203
// There's no `s1.b`
206
- -( if -s1. a < -s2. a && -s1. a < -s2. b {
207
- s1. c
208
- } else {
209
- s2. a
210
- } )
204
+ -( if -s1. a < -s2. a && -s1. a < -s2. b { s1. c } else { s2. a } )
211
205
}
212
206
213
207
fn main ( ) { }
0 commit comments