diff --git a/Cargo.toml b/Cargo.toml index 832a6dff401..5306de9b8d0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clippy" -version = "0.0.30" +version = "0.0.31" authors = [ "Manish Goregaokar ", "Andre Bogus ", diff --git a/src/consts.rs b/src/consts.rs index 791bf587bb5..f7069476546 100644 --- a/src/consts.rs +++ b/src/consts.rs @@ -20,10 +20,8 @@ use syntax::ast::Lit_; use syntax::ast::LitIntType::*; use syntax::ast::LitIntType; use syntax::ast::{UintTy, FloatTy, StrStyle}; -use syntax::ast::UintTy::*; use syntax::ast::FloatTy::*; use syntax::ast::Sign::{self, Plus, Minus}; -use syntax::ast_util; #[derive(PartialEq, Eq, Debug, Copy, Clone)] @@ -195,9 +193,9 @@ impl fmt::Display for Constant { let (sign, suffix) = match *ity { LitIntType::SignedIntLit(ref sity, ref sign) => (if let Sign::Minus = *sign { "-" } else { "" }, - ast_util::int_ty_to_string(*sity)), + sity.ty_to_string()), LitIntType::UnsignedIntLit(ref uity) => - ("", ast_util::uint_ty_to_string(*uity)), + ("", uity.ty_to_string()), LitIntType::UnsuffixedIntLit(ref sign) => (if let Sign::Minus = *sign { "-" } else { "" }, "".into()), diff --git a/src/precedence.rs b/src/precedence.rs index be5f44c823a..39a3e9e56c2 100644 --- a/src/precedence.rs +++ b/src/precedence.rs @@ -1,7 +1,6 @@ use rustc::lint::*; use syntax::codemap::Spanned; use syntax::ast::*; -use syntax::ast_util::binop_to_string; use utils::{span_lint, snippet}; @@ -38,17 +37,17 @@ impl EarlyLintPass for Precedence { &format!("operator precedence can trip the unwary. \ Consider parenthesizing your expression:\ `({}) {} ({})`", snippet(cx, left.span, ".."), - binop_to_string(op), snippet(cx, right.span, ".."))), + op.to_string(), snippet(cx, right.span, ".."))), (true, false) => span_lint(cx, PRECEDENCE, expr.span, &format!("operator precedence can trip the unwary. \ Consider parenthesizing your expression:\ `({}) {} {}`", snippet(cx, left.span, ".."), - binop_to_string(op), snippet(cx, right.span, ".."))), + op.to_string(), snippet(cx, right.span, ".."))), (false, true) => span_lint(cx, PRECEDENCE, expr.span, &format!("operator precedence can trip the unwary. \ Consider parenthesizing your expression:\ `{} {} ({})`", snippet(cx, left.span, ".."), - binop_to_string(op), snippet(cx, right.span, ".."))), + op.to_string(), snippet(cx, right.span, ".."))), _ => (), } }