rust/compiler/rustc_session/src
bors 42b2496320 Auto merge of #126597 - estebank:unicode-output, r=fmease
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.

In order to enable, the flags `-Zunstable-options=yes --error-format=human-unicode` must be passed in.

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
  |   ^^^^^^^^
```

After:

![rustc output with unicode box drawing characters](https://github.com/rust-lang/rust/assets/1606434/d210b79a-6579-4407-9706-ba8edc6e9f25)

Before:
![current rustc output with ASCII art](https://github.com/rust-lang/rust/assets/1606434/5aecccf8-a6ee-4469-8b39-72fb0d979a9f)
2024-11-11 00:00:58 +00:00
..
config Auto merge of #129884 - RalfJung:forbidden-target-features, r=workingjubilee 2024-11-05 16:25:45 +00:00
code_stats.rs compiler: Add rustc_abi dependence to the compiler 2024-10-27 21:10:58 -07:00
config.rs Auto merge of #126597 - estebank:unicode-output, r=fmease 2024-11-11 00:00:58 +00:00
cstore.rs Rollup merge of #130586 - dpaoliello:fixrawdylib, r=wesleywiser 2024-11-07 18:48:20 -08:00
errors.rs Rename target triple to target tuple in many places in the compiler 2024-11-02 21:29:59 +01:00
filesearch.rs Rename target triple to target tuple in many places in the compiler 2024-11-02 21:29:59 +01:00
lib.rs Rollup merge of #129087 - slanterns:option_get_or_insert_default, r=dtolnay 2024-09-27 19:07:58 +02:00
options.rs Rollup merge of #132259 - mrkajetanp:branch-protection-pauth-lr, r=davidtwco 2024-11-05 20:10:49 +01:00
output.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
parse.rs give a hint which feature is missing 2024-11-09 23:32:06 +01:00
search_paths.rs Rename target triple to target tuple in many places in the compiler 2024-11-02 21:29:59 +01:00
session.rs Auto merge of #126597 - estebank:unicode-output, r=fmease 2024-11-11 00:00:58 +00:00
utils.rs remove a couple of redundant String to String conversion 2024-10-12 22:07:46 +02:00
version.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00