File tree 2 files changed +7
-8
lines changed
2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,6 @@ fn check_extend_method(
100
100
struct_expr : & rustc_hir:: Expr < ' _ > ,
101
101
) -> Option < rustc_span:: Span > {
102
102
let mut read_found = false ;
103
- let next_stmt_span;
104
103
let mut spanless_eq = SpanlessEq :: new ( cx) ;
105
104
106
105
let _: Option < !> = for_each_expr ( block, |expr| {
@@ -117,16 +116,16 @@ fn check_extend_method(
117
116
ControlFlow :: Continue ( ( ) )
118
117
} ) ;
119
118
120
- if idx == block. stmts . len ( ) - 1 {
119
+ let next_stmt_span : rustc_span :: Span = if idx == block. stmts . len ( ) - 1 {
121
120
if let Some ( e) = block. expr {
122
- next_stmt_span = e. span ;
121
+ e. span
123
122
} else {
124
123
return None ;
125
124
}
126
125
} else {
127
126
let next_stmt = & block. stmts [ idx + 1 ] ;
128
- next_stmt_span = next_stmt. span ;
129
- }
127
+ return Some ( next_stmt. span ) ;
128
+ } ;
130
129
131
130
if read_found {
132
131
return Some ( next_stmt_span) ;
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ use std::collections::VecDeque;
6
6
7
7
fn main ( ) {
8
8
vec_reserve ( ) ;
9
- // vec_deque_reserve();
10
- // hash_map_reserve();
11
- // msrv_1_62();
9
+ vec_deque_reserve ( ) ;
10
+ hash_map_reserve ( ) ;
11
+ msrv_1_62 ( ) ;
12
12
}
13
13
14
14
fn vec_reserve ( ) {
You can’t perform that action at this time.
0 commit comments