diff options
| author | togami2864 <tuabobo123@gmail.com> | 2021-11-26 18:42:41 +0900 |
|---|---|---|
| committer | togami2864 <tuabobo123@gmail.com> | 2021-11-26 18:42:41 +0900 |
| commit | a745cc55f3e5658e90c971d6532529c2526bf87b (patch) | |
| tree | 22f2129a58a344e5f56000ead5febb8e86386dfa | |
| parent | 140ba610e490c356bfbe982e62bf686232e5f394 (diff) | |
| download | rust-a745cc55f3e5658e90c971d6532529c2526bf87b.tar.gz rust-a745cc55f3e5658e90c971d6532529c2526bf87b.zip | |
make non_ascii_literal to catch char
| -rw-r--r-- | clippy_lints/src/unicode.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/unicode.rs b/clippy_lints/src/unicode.rs index a514e8c44e2..b5e4bc75bd1 100644 --- a/clippy_lints/src/unicode.rs +++ b/clippy_lints/src/unicode.rs @@ -75,7 +75,7 @@ declare_lint_pass!(Unicode => [INVISIBLE_CHARACTERS, NON_ASCII_LITERAL, UNICODE_ impl LateLintPass<'_> for Unicode { fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) { if let ExprKind::Lit(ref lit) = expr.kind { - if let LitKind::Str(_, _) = lit.node { + if let LitKind::Str(_, _) | LitKind::Char(_)= lit.node { check_str(cx, lit.span, expr.hir_id); } } |
