]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/unicode.rs
Merge branch 'macro-use' into HEAD
[rust.git] / clippy_lints / src / unicode.rs
index 21c6b5211531973f85552bf43768c306f8b77994..c4a795bfacb342430df1b60a86c8546182082888 100644 (file)
@@ -1,9 +1,10 @@
 use rustc::lint::*;
+use rustc::{declare_lint, lint_array};
 use rustc::hir::*;
 use syntax::ast::{LitKind, NodeId};
 use syntax::codemap::Span;
 use unicode_normalization::UnicodeNormalization;
-use utils::{is_allowed, snippet, span_help_and_lint};
+use crate::utils::{is_allowed, snippet, span_help_and_lint};
 
 /// **What it does:** Checks for the Unicode zero-width space in the code.
 ///
@@ -71,7 +72,7 @@ fn get_lints(&self) -> LintArray {
 
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Unicode {
     fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
-        if let ExprLit(ref lit) = expr.node {
+        if let ExprKind::Lit(ref lit) = expr.node {
             if let LitKind::Str(_, _) = lit.node {
                 check_str(cx, lit.span, expr.id)
             }