diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-11-29 04:23:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-29 04:23:23 +0100 |
| commit | 20473eba0b7d6a19e4e303d4e01e930483bb9921 (patch) | |
| tree | 92d4144a49cc14bf17304845eb565dc404838180 /compiler/rustc_parse/src/parser | |
| parent | 68d31b1906c026edcfd72fbc5f7a0c2577ba0f66 (diff) | |
| parent | d9fef774e3ba9e00f0ea143f632f66b1d87afff6 (diff) | |
| download | rust-20473eba0b7d6a19e4e303d4e01e930483bb9921.tar.gz rust-20473eba0b7d6a19e4e303d4e01e930483bb9921.zip | |
Rollup merge of #118394 - nnethercote:rm-hir-Ops, r=cjgillot
Remove HIR opkinds `hir::BinOp`, `hir::BinOpKind`, and `hir::UnOp` are identical to `ast::BinOp`, `ast::BinOpKind`, and `ast::UnOp`, respectively. This seems silly, so this PR removes the HIR ones. (A re-export lets the AST ones be referred to using a `hir::` qualifier, which avoids renaming churn.) r? `@cjgillot`
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/stmt.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/stmt.rs b/compiler/rustc_parse/src/parser/stmt.rs index 620ba4a3cb3..1ee5a96d5dc 100644 --- a/compiler/rustc_parse/src/parser/stmt.rs +++ b/compiler/rustc_parse/src/parser/stmt.rs @@ -384,10 +384,10 @@ impl<'a> Parser<'a> { fn check_let_else_init_bool_expr(&self, init: &ast::Expr) { if let ast::ExprKind::Binary(op, ..) = init.kind { - if op.node.lazy() { + if op.node.is_lazy() { self.sess.emit_err(errors::InvalidExpressionInLetElse { span: init.span, - operator: op.node.to_string(), + operator: op.node.as_str(), sugg: errors::WrapExpressionInParentheses { left: init.span.shrink_to_lo(), right: init.span.shrink_to_hi(), |
