fix stderr
This commit is contained in:
parent
a745cc55f3
commit
e8ef6ca5e3
@ -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(_, _) | LitKind::Char(_)= lit.node {
|
||||
if let LitKind::Str(_, _) | LitKind::Char(_) = lit.node {
|
||||
check_str(cx, lit.span, expr.hir_id);
|
||||
}
|
||||
}
|
||||
|
@ -34,5 +34,17 @@ LL | print!("Üben!");
|
||||
|
|
||||
= note: `-D clippy::non-ascii-literal` implied by `-D warnings`
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
error: literal non-ASCII character detected
|
||||
--> $DIR/unicode.rs:26:32
|
||||
|
|
||||
LL | const _EMPTY_BLOCK: char = '▱';
|
||||
| ^^^ help: consider replacing the string with: `'/u{25b1}'`
|
||||
|
||||
error: literal non-ASCII character detected
|
||||
--> $DIR/unicode.rs:27:31
|
||||
|
|
||||
LL | const _FULL_BLOCK: char = '▰';
|
||||
| ^^^ help: consider replacing the string with: `'/u{25b0}'`
|
||||
|
||||
error: aborting due to 7 previous errors
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user