Skip to content

Commit 5133671

Browse files
committed
Remove uses of ExprKind::Inplace
1 parent 386897b commit 5133671

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clippy_lints/src/utils/sugg.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ impl<'a> Sugg<'a> {
9898
ast::ExprKind::Closure(..) |
9999
ast::ExprKind::If(..) |
100100
ast::ExprKind::IfLet(..) |
101-
ast::ExprKind::InPlace(..) |
102101
ast::ExprKind::Unary(..) |
103102
ast::ExprKind::Match(..) => Sugg::MaybeParen(snippet),
104103
ast::ExprKind::Block(..) |
@@ -308,7 +307,6 @@ pub fn make_assoc(op: AssocOp, lhs: &Sugg, rhs: &Sugg) -> Sugg<'static> {
308307
AssocOp::ShiftLeft |
309308
AssocOp::ShiftRight |
310309
AssocOp::Subtract => format!("{} {} {}", lhs, op.to_ast_binop().expect("Those are AST ops").to_string(), rhs),
311-
AssocOp::Inplace => format!("in ({}) {}", lhs, rhs),
312310
AssocOp::Assign => format!("{} = {}", lhs, rhs),
313311
AssocOp::AssignOp(op) => format!("{} {}= {}", lhs, token_to_string(&token::BinOp(op)), rhs),
314312
AssocOp::As => format!("{} as {}", lhs, rhs),
@@ -350,7 +348,7 @@ fn associativity(op: &AssocOp) -> Associativity {
350348
use syntax::util::parser::AssocOp::*;
351349

352350
match *op {
353-
Inplace | Assign | AssignOp(_) => Associativity::Right,
351+
Assign | AssignOp(_) => Associativity::Right,
354352
Add | BitAnd | BitOr | BitXor | LAnd | LOr | Multiply | As | Colon => Associativity::Both,
355353
Divide |
356354
Equal |

0 commit comments

Comments
 (0)