@@ -511,7 +511,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
511511 }
512512
513513 fn check_stmt ( & mut self , cx : & LateContext < ' a , ' tcx > , stmt : & ' tcx Stmt ) {
514- if let StmtSemi ( ref expr, _) = stmt. node {
514+ if let StmtKind :: Semi ( ref expr, _) = stmt. node {
515515 if let ExprKind :: MethodCall ( ref method, _, ref args) = expr. node {
516516 if args. len ( ) == 1 && method. ident . name == "collect" && match_trait_method ( cx, expr, & paths:: ITERATOR ) {
517517 span_lint (
@@ -584,8 +584,8 @@ fn never_loop_block(block: &Block, main_loop_id: NodeId) -> NeverLoopResult {
584584
585585fn stmt_to_expr ( stmt : & Stmt ) -> Option < & Expr > {
586586 match stmt. node {
587- StmtSemi ( ref e, ..) | StmtExpr ( ref e, ..) => Some ( e) ,
588- StmtDecl ( ref d, ..) => decl_to_expr ( d) ,
587+ StmtKind :: Semi ( ref e, ..) | StmtKind :: Expr ( ref e, ..) => Some ( e) ,
588+ StmtKind :: Decl ( ref d, ..) => decl_to_expr ( d) ,
589589 }
590590}
591591
@@ -859,8 +859,8 @@ fn get_indexed_assignments<'a, 'tcx>(
859859 stmts
860860 . iter ( )
861861 . map ( |stmt| match stmt. node {
862- Stmt_ :: StmtDecl ( ..) => None ,
863- Stmt_ :: StmtExpr ( ref e, _node_id) | Stmt_ :: StmtSemi ( ref e, _node_id) => Some ( get_assignment ( cx, e, var) ) ,
862+ StmtKind :: Decl ( ..) => None ,
863+ StmtKind :: Expr ( ref e, _node_id) | StmtKind :: Semi ( ref e, _node_id) => Some ( get_assignment ( cx, e, var) ) ,
864864 } )
865865 . chain (
866866 expr. as_ref ( )
@@ -1809,7 +1809,7 @@ fn extract_expr_from_first_stmt(block: &Block) -> Option<&Expr> {
18091809 if block. stmts . is_empty ( ) {
18101810 return None ;
18111811 }
1812- if let StmtDecl ( ref decl, _) = block. stmts [ 0 ] . node {
1812+ if let StmtKind :: Decl ( ref decl, _) = block. stmts [ 0 ] . node {
18131813 if let DeclLocal ( ref local) = decl. node {
18141814 if let Some ( ref expr) = local. init {
18151815 Some ( expr)
@@ -1829,8 +1829,8 @@ fn extract_first_expr(block: &Block) -> Option<&Expr> {
18291829 match block. expr {
18301830 Some ( ref expr) if block. stmts . is_empty ( ) => Some ( expr) ,
18311831 None if !block. stmts . is_empty ( ) => match block. stmts [ 0 ] . node {
1832- StmtExpr ( ref expr, _) | StmtSemi ( ref expr, _) => Some ( expr) ,
1833- StmtDecl ( ..) => None ,
1832+ StmtKind :: Expr ( ref expr, _) | StmtKind :: Semi ( ref expr, _) => Some ( expr) ,
1833+ StmtKind :: Decl ( ..) => None ,
18341834 } ,
18351835 _ => None ,
18361836 }
0 commit comments