]> git.lizzy.rs Git - rust.git/commitdiff
rustup https://github.com/rust-lang/rust/pull/60803/
authorMatthias Krüger <matthias.krueger@famsik.de>
Fri, 24 May 2019 13:25:36 +0000 (15:25 +0200)
committerMatthias Krüger <matthias.krueger@famsik.de>
Fri, 24 May 2019 13:25:36 +0000 (15:25 +0200)
clippy_lints/src/utils/sugg.rs

index 4d87373ec6a9cd58fd5a87294e5a5e78a93133d2..d1e4db6264f74ad3dc2e5e6ddbdf6bdee4d2257f 100644 (file)
@@ -136,7 +136,6 @@ pub fn ast(cx: &EarlyContext<'_>, expr: &ast::Expr, default: &'a str) -> Self {
             | ast::ExprKind::Closure(..)
             | ast::ExprKind::If(..)
             | ast::ExprKind::IfLet(..)
-            | ast::ExprKind::ObsoleteInPlace(..)
             | ast::ExprKind::Unary(..)
             | ast::ExprKind::Match(..) => Sugg::MaybeParen(snippet),
             ast::ExprKind::Async(..)
@@ -385,7 +384,6 @@ fn needs_paren(op: &AssocOp, other: &AssocOp, dir: Associativity) -> bool {
             rhs
         ),
         AssocOp::Assign => format!("{} = {}", lhs, rhs),
-        AssocOp::ObsoleteInPlace => format!("in ({}) {}", lhs, rhs),
         AssocOp::AssignOp(op) => format!("{} {}= {}", lhs, token_to_string(&token::BinOp(op)), rhs),
         AssocOp::As => format!("{} as {}", lhs, rhs),
         AssocOp::DotDot => format!("{}..{}", lhs, rhs),
@@ -425,7 +423,7 @@ fn associativity(op: &AssocOp) -> Associativity {
     use syntax::util::parser::AssocOp::*;
 
     match *op {
-        ObsoleteInPlace | Assign | AssignOp(_) => Associativity::Right,
+        Assign | AssignOp(_) => Associativity::Right,
         Add | BitAnd | BitOr | BitXor | LAnd | LOr | Multiply | As | Colon => Associativity::Both,
         Divide | Equal | Greater | GreaterEqual | Less | LessEqual | Modulus | NotEqual | ShiftLeft | ShiftRight
         | Subtract => Associativity::Left,