Skip to content

Commit e8ef6ca

Browse files
committed
fix stderr
1 parent a745cc5 commit e8ef6ca

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

clippy_lints/src/unicode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ declare_lint_pass!(Unicode => [INVISIBLE_CHARACTERS, NON_ASCII_LITERAL, UNICODE_
7575
impl LateLintPass<'_> for Unicode {
7676
fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) {
7777
if let ExprKind::Lit(ref lit) = expr.kind {
78-
if let LitKind::Str(_, _) | LitKind::Char(_)= lit.node {
78+
if let LitKind::Str(_, _) | LitKind::Char(_) = lit.node {
7979
check_str(cx, lit.span, expr.hir_id);
8080
}
8181
}

tests/ui/unicode.stderr

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,17 @@ LL | print!("Üben!");
3434
|
3535
= note: `-D clippy::non-ascii-literal` implied by `-D warnings`
3636

37-
error: aborting due to 5 previous errors
37+
error: literal non-ASCII character detected
38+
--> $DIR/unicode.rs:26:32
39+
|
40+
LL | const _EMPTY_BLOCK: char = '▱';
41+
| ^^^ help: consider replacing the string with: `'/u{25b1}'`
42+
43+
error: literal non-ASCII character detected
44+
--> $DIR/unicode.rs:27:31
45+
|
46+
LL | const _FULL_BLOCK: char = '▰';
47+
| ^^^ help: consider replacing the string with: `'/u{25b0}'`
48+
49+
error: aborting due to 7 previous errors
3850

0 commit comments

Comments
 (0)