mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
make non_ascii_literal to catch char
This commit is contained in:
parent
140ba610e4
commit
a745cc55f3
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user