]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/precedence.rs
rustup https://github.com/rust-lang/rust/pull/67455
[rust.git] / clippy_lints / src / precedence.rs
index b00062cd55a146ebcc2376ec7b2fbe892ace7b9f..f259f9fb071e04ba76c7579c74c5b6292c245cc7 100644 (file)
@@ -1,7 +1,8 @@
 use crate::utils::{snippet_with_applicability, span_lint_and_sugg};
+use rustc::declare_lint_pass;
 use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass};
-use rustc::{declare_lint_pass, declare_tool_lint};
 use rustc_errors::Applicability;
+use rustc_session::declare_tool_lint;
 use syntax::ast::*;
 use syntax::source_map::Spanned;
 
@@ -90,7 +91,7 @@ fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) {
                 if let Some(slf) = args.first() {
                     if let ExprKind::Lit(ref lit) = slf.kind {
                         match lit.kind {
-                            LitKind::Int(..) | LitKind::Float(..) | LitKind::FloatUnsuffixed(..) => {
+                            LitKind::Int(..) | LitKind::Float(..) => {
                                 let mut applicability = Applicability::MachineApplicable;
                                 span_lint_and_sugg(
                                     cx,
@@ -121,6 +122,7 @@ fn is_arith_expr(expr: &Expr) -> bool {
     }
 }
 
+#[must_use]
 fn is_bit_op(op: BinOpKind) -> bool {
     use syntax::ast::BinOpKind::*;
     match op {
@@ -129,6 +131,7 @@ fn is_bit_op(op: BinOpKind) -> bool {
     }
 }
 
+#[must_use]
 fn is_arith_op(op: BinOpKind) -> bool {
     use syntax::ast::BinOpKind::*;
     match op {