use rustc::hir;
use rustc::lint::*;
+use rustc::{declare_lint, lint_array};
+use if_chain::if_chain;
use rustc::ty::TypeVariants;
use std::f32;
use std::f64;
///
/// ```rust
/// // Bad
-/// Insert a short example of code that triggers the lint
/// let v: f32 = 0.123_456_789_9;
/// println!("{}", v); // 0.123_456_789
///
/// // Good
-/// Insert a short example of improved code that doesn't trigger the lint
/// let v: f64 = 0.123_456_789_9;
/// println!("{}", v); // 0.123_456_789_9
/// ```
if_chain! {
let ty = cx.tables.expr_ty(expr);
if let TypeVariants::TyFloat(fty) = ty.sty;
- if let hir::ExprLit(ref lit) = expr.node;
+ if let hir::ExprKind::Lit(ref lit) = expr.node;
if let LitKind::Float(sym, _) | LitKind::FloatUnsuffixed(sym) = lit.node;
if let Some(sugg) = self.check(sym, fty);
then {