Rust upgrade to rustc 1.7.0-nightly (8ad12c3e2 2015-12-19)

This commit is contained in:
Manish Goregaokar 2015-12-19 19:08:22 +05:30
parent 9dca15de3e
commit a65a7770b3
3 changed files with 6 additions and 9 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "clippy"
version = "0.0.30"
version = "0.0.31"
authors = [
"Manish Goregaokar <manishsmail@gmail.com>",
"Andre Bogus <bogusandre@gmail.com>",

View file

@ -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()),

View file

@ -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, ".."))),
_ => (),
}
}