]> git.lizzy.rs Git - rust.git/commitdiff
Don't panic in `Expr::needs_parens_in`
authorMaybe Waffle <waffle.lapkin@gmail.com>
Tue, 20 Dec 2022 15:16:26 +0000 (15:16 +0000)
committerMaybe Waffle <waffle.lapkin@gmail.com>
Tue, 20 Dec 2022 15:16:26 +0000 (15:16 +0000)
crates/syntax/src/ast/prec.rs

index 53b31098e40fa1109e92f454f742f07f268791c5..ac7ef45c1dee5776e13788259945f5c3ff19919e 100644 (file)
@@ -21,7 +21,7 @@ pub fn needs_parens_in(&self, parent: SyntaxNode) -> bool {
                 ast::StmtList(_) => self.needs_parens_in_stmt(None),
                 ast::ArgList(_) => false,
                 ast::MatchArm(_) => false,
-                _ => unimplemented!()
+                _ => false,
             }
         }
     }