Rustup to *rustc 1.15.0-nightly (7b3eeea22 2016-11-21)*

This commit is contained in:
mcarton
2016-11-23 21:19:03 +01:00
parent 530083c3b9
commit c35f82b823
28 changed files with 111 additions and 105 deletions

View File

@@ -2,6 +2,7 @@ use rustc::lint::*;
use rustc::hir::*;
use std::f64::consts as f64;
use syntax::ast::{Lit, LitKind, FloatTy};
use syntax::symbol;
use utils::span_lint;
/// **What it does:** Checks for floating point literals that approximate
@@ -75,7 +76,8 @@ fn check_lit(cx: &LateContext, lit: &Lit, e: &Expr) {
}
}
fn check_known_consts(cx: &LateContext, e: &Expr, s: &str, module: &str) {
fn check_known_consts(cx: &LateContext, e: &Expr, s: &symbol::Symbol, module: &str) {
let s = &*s.as_str();
if s.parse::<f64>().is_ok() {
for &(constant, name, min_digits) in KNOWN_CONSTS {
if is_approx_const(constant, s, min_digits) {