rust/tests/ui/parser/bad-char-literals.stderr
Esteban Küber 1d78004575
Add Unicode block-drawing compiler output support
Add nightly-only theming support to rustc output using Unicode box
drawing characters instead of ASCII-art to draw the terminal UI:

After:

```
error: foo
  ╭▸ test.rs:3:3
  │
3 │       X0 Y0 Z0
  │   ┌───╿──│──┘
  │  ┌│───│──┘
  │ ┏││━━━┙
  │ ┃││
4 │ ┃││   X1 Y1 Z1
5 │ ┃││   X2 Y2 Z2
  │ ┃│└────╿──│──┘ `Z` label
  │ ┃└─────│──┤
  │ ┗━━━━━━┥  `Y` is a good letter too
  │        `X` is a good letter
  ╰╴
note: bar
  ╭▸ test.rs:4:3
  │
4 │ ┏   X1 Y1 Z1
5 │ ┃   X2 Y2 Z2
6 │ ┃   X3 Y3 Z3
  │ ┗━━━━━━━━━━┛
  ├ note: bar
  ╰ note: baz
note: qux
  ╭▸ test.rs:4:3
  │
4 │   X1 Y1 Z1
  ╰╴  ━━━━━━━━
```

Before:

```
error: foo
 --> test.rs:3:3
  |
3 |       X0 Y0 Z0
  |    ___^__-__-
  |   |___|__|
  |  ||___|
  | |||
4 | |||   X1 Y1 Z1
5 | |||   X2 Y2 Z2
  | |||____^__-__- `Z` label
  | ||_____|__|
  | |______|  `Y` is a good letter too
  |        `X` is a good letter
  |
note: bar
 --> test.rs:4:3
  |
4 | /   X1 Y1 Z1
5 | |   X2 Y2 Z2
6 | |   X3 Y3 Z3
  | |__________^
  = note: bar
  = note: baz
note: qux
 --> test.rs:4:3
  |
4 |   X1 Y1 Z1
  |   ^^^^^^^^
```
2024-11-10 23:57:18 +01:00

60 lines
1.0 KiB
Plaintext

error: character constant must be escaped: `'`
--> $DIR/bad-char-literals.rs:6:6
|
LL | ''';
| ^
|
help: escape the character
|
LL | '\'';
| ~~
error: character constant must be escaped: `\n`
--> $DIR/bad-char-literals.rs:10:6
|
LL | '
| ______^
LL | | ';
| |_^
|
help: escape the character
|
LL | '\n';
| ++
error: character constant must be escaped: `\r`
--> $DIR/bad-char-literals.rs:15:6
|
LL | '␍';
| ^
|
help: escape the character
|
LL | '\r';
| ++
error: character literal may only contain one codepoint
--> $DIR/bad-char-literals.rs:18:5
|
LL | '-␀-';
| ^^^^^
|
help: if you meant to write a string literal, use double quotes
|
LL | "-␀-";
| ~ ~
error: character constant must be escaped: `\t`
--> $DIR/bad-char-literals.rs:21:6
|
LL | ' ';
| ^^^^
|
help: escape the character
|
LL | '\t';
| ++
error: aborting due to 5 previous errors