File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 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(
100100 struct_expr : & rustc_hir:: Expr < ' _ > ,
101101) -> Option < rustc_span:: Span > {
102102 let mut read_found = false ;
103- let next_stmt_span;
104103 let mut spanless_eq = SpanlessEq :: new ( cx) ;
105104
106105 let _: Option < !> = for_each_expr ( block, |expr| {
@@ -117,16 +116,16 @@ fn check_extend_method(
117116 ControlFlow :: Continue ( ( ) )
118117 } ) ;
119118
120- if idx == block. stmts . len ( ) - 1 {
119+ let next_stmt_span : rustc_span :: Span = if idx == block. stmts . len ( ) - 1 {
121120 if let Some ( e) = block. expr {
122- next_stmt_span = e. span ;
121+ e. span
123122 } else {
124123 return None ;
125124 }
126125 } else {
127126 let next_stmt = & block. stmts [ idx + 1 ] ;
128- next_stmt_span = next_stmt. span ;
129- }
127+ return Some ( next_stmt. span ) ;
128+ } ;
130129
131130 if read_found {
132131 return Some ( next_stmt_span) ;
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ use std::collections::VecDeque;
66
77fn main ( ) {
88 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 ( ) ;
1212}
1313
1414fn vec_reserve ( ) {
You can’t perform that action at this time.
0 commit comments