Rustup to rustc 1.36.0-nightly (1764b2972 2019-05-12)

This commit is contained in:
Manish Goregaokar
2019-05-13 11:29:54 -07:00
parent c79838e5d6
commit 42480fd031
2 changed files with 6 additions and 10 deletions

View File

@@ -55,13 +55,13 @@ declare_lint_pass!(ApproxConstant => [APPROX_CONSTANT]);
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ApproxConstant {
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx Expr) {
if let ExprKind::Lit(lit) = &e.node {
check_lit(cx, lit, e);
check_lit(cx, &lit.node, e);
}
}
}
fn check_lit(cx: &LateContext<'_, '_>, lit: &Lit, e: &Expr) {
match lit.node {
fn check_lit(cx: &LateContext<'_, '_>, lit: &LitKind, e: &Expr) {
match *lit {
LitKind::Float(s, FloatTy::F32) => check_known_consts(cx, e, s, "f32"),
LitKind::Float(s, FloatTy::F64) => check_known_consts(cx, e, s, "f64"),
LitKind::FloatUnsuffixed(s) => check_known_consts(cx, e, s, "f{32, 64}"),