rust/tests/rustdoc-ui
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
..
argfile
auxiliary
coverage
doctest Rollup merge of #132210 - notriddle:notriddle/doctest-span-hack, r=GuillaumeGomez 2024-10-30 14:01:37 -07:00
error-in-impl-trait
generate-link-to-definition Update rustdoc-ui test for --generate-link-to-definition option 2024-08-13 15:08:07 +02:00
intra-doc Improve documentation for intra-doc links computation 2024-10-15 15:42:53 +02:00
issues rustdoc: rewrite stability inheritance as a pass 2024-09-30 21:58:18 +00:00
lints Improve mistyped docblock attribute warning messages 2024-09-28 18:38:11 +02:00
scrape-examples
suggestions
synthetic-auto-trait-impls
2024-doctests-checks.rs Fix commands syntax in rustdoc-ui tests 2024-08-13 20:14:57 +02:00
2024-doctests-checks.stdout Only keep "useful" code in tests/rustdoc-ui/2024-doctests-checks.rs 2024-08-13 20:14:57 +02:00
2024-doctests-crate-attribute.rs Fix commands syntax in rustdoc-ui tests 2024-08-13 20:14:57 +02:00
2024-doctests-crate-attribute.stdout Add doctest to ensure that doctests with crate-level attributes are not part of merged doctest 2024-08-13 20:14:57 +02:00
ambiguous-inherent-assoc-ty.rs
apit-46976.rs
associated-constant-not-allowed-102467.rs rustdoc: rename issue-\d+.rs tests to have meaningful names 2024-09-12 13:47:51 -07:00
associated-constant-not-allowed-102467.stderr rustdoc: re-bless stderrs after renaming the test case 2024-09-12 13:48:51 -07:00
bounded-hr-lifetime.rs
bounded-hr-lifetime.stderr
cfg-boolean-literal.rs Adjust rustdoc for literal boolean support 2024-10-04 09:09:20 +02:00
check-cfg.rs
check-cfg.stderr
check-doc-alias-attr-location.rs
check-doc-alias-attr-location.stderr
check-doc-alias-attr.rs
check-doc-alias-attr.stderr
circular-intra-doc-link-48414.rs
const_arg_in_type_position.rs
const_arg_in_type_position.stderr
const-evalutation-ice.rs
const-evalutation-ice.stderr
crate-reference-in-block-module.rs
crate-reference-in-block-module.stderr
custom_code_classes_in_docs-warning3.rs
custom_code_classes_in_docs-warning3.stderr
deprecated-attrs.rs Add doc(plugins), doc(passes), etc. to INVALID_DOC_ATTRIBUTES 2024-10-15 13:28:39 +02:00
deprecated-attrs.stderr Add doc(plugins), doc(passes), etc. to INVALID_DOC_ATTRIBUTES 2024-10-15 13:28:39 +02:00
deref-generic.rs
diagnostic-width.rs
diagnostic-width.stderr
disambiguator-endswith-named-suffix.rs
disambiguator-endswith-named-suffix.stderr
disambiguator-macro-endswith-exclamatory.rs
disambiguator-macro-endswith-exclamatory.stderr
doc-alias-assoc-const.rs
doc-alias-assoc-const.stderr
doc-alias-crate-level.rs
doc-alias-crate-level.stderr
doc-alias-same-name.rs
doc-alias-same-name.stderr
doc-cfg.rs
doc-cfg.stderr
doc-include-suggestion.rs
doc-include-suggestion.stderr
feature-gate-doc_cfg_hide.rs
feature-gate-doc_cfg_hide.stderr
hidden-trait-method-34423.rs
ice-assoc-const-for-primitive-31808.rs
ice-assoc-type-loop-102154.rs
ice-blanket-impl-52873.rs
ice-blanket-impl-56701.rs
ice-blanket-impl-119792.rs
ice-blanket-impl-selection-55001.rs
ice-bug-report-url.rs
ice-bug-report-url.stderr
ice-cross-crate-opaque-assoc-type-73061.rs
ice-method-where-clause-circular-100620.rs
ice-unresolved-import-100241.rs
ice-unresolved-import-100241.stderr
ignore-block-help.rs
ignore-block-help.stderr
impl-fn-nesting.rs
impl-fn-nesting.stderr
include-str-bare-urls.rs
include-str-bare-urls.stderr
infinite-recursive-type.rs
infinite-recursive-type.stderr
inherent-assoc-consts-36031.rs
invalid_associated_const.rs
invalid_associated_const.stderr
invalid_const_in_lifetime_position.rs
invalid_const_in_lifetime_position.stderr Compiler: Rename "object safe" to "dyn compatible" 2024-09-25 13:26:48 +02:00
invalid_infered_static_and_const.rs
invalid_infered_static_and_const.stderr
invalid-cfg.rs
invalid-cfg.stderr
invalid-keyword.rs
invalid-keyword.stderr
invalid-redundant-explicit-link.rs
invalid-syntax.rs
invalid-syntax.stderr Add Unicode block-drawing compiler output support 2024-11-10 23:57:18 +01:00
invalid-theme-name.rs
invalid-theme-name.stderr
macro-docs.rs
macro-docs.stderr
macro-docs.stdout
mismatched_arg_count.rs
mismatched_arg_count.stderr
nested-extern-crate-46271.rs
nested-macro-rules-47639.rs
normalize-cycle.rs
normalize-in-inlined-type-alias.rs
normalize-overflow.rs
not-wf-ambiguous-normalization.rs
not-wf-ambiguous-normalization.stderr
output-format-html-stable.rs
private-type-cycle-110629.rs rustdoc: rename issue-\d+.rs tests to have meaningful names 2024-09-12 13:47:51 -07:00
private-type-cycle-dyn-110629.rs rustdoc: rename issue-\d+.rs tests to have meaningful names 2024-09-12 13:47:51 -07:00
private-type-cycle-dyn-110629.stderr rustdoc: re-bless stderrs after renaming the test case 2024-09-12 13:48:51 -07:00
proc_macro_bug.rs
proc_macro_bug.stderr
projection-as-union-type-error.rs rustdoc: add two regression tests 2024-09-09 22:35:10 +02:00
projection-as-union-type-error.stderr rustdoc: add two regression tests 2024-09-09 22:35:10 +02:00
pub-use-primitive-document-private-items-95633.rs
range-pattern.rs
recursive-deref-ice.rs
recursive-type-alias-impl-trait-declaration-too-subtle-2.rs rustdoc: add two regression tests 2024-09-09 22:35:10 +02:00
redundant-explicit-links-123677.rs
remap-path-prefix-failed-doctest-output.rs
remap-path-prefix-failed-doctest-output.stdout
remap-path-prefix-invalid-doctest.rs
remap-path-prefix-invalid-doctest.stdout
remap-path-prefix-lint.rs
remap-path-prefix-lint.stderr
remap-path-prefix-passed-doctest-output.rs
remap-path-prefix-passed-doctest-output.stdout
rustc-check-passes.rs
rustc-check-passes.stderr terminology: #[feature] *enables* a feature (instead of "declaring" or "activating" it) 2024-10-22 07:37:54 +01:00
search-index-generics-recursion-bug-issue-59502.rs
show-coverage-json.rs Add UI regressions tests for rustdoc --show-coverage option 2024-11-04 14:46:04 +01:00
show-coverage-json.stdout Add UI regressions tests for rustdoc --show-coverage option 2024-11-04 14:46:04 +01:00
show-coverage.rs Add UI regressions tests for rustdoc --show-coverage option 2024-11-04 14:46:04 +01:00
show-coverage.stdout Add UI regressions tests for rustdoc --show-coverage option 2024-11-04 14:46:04 +01:00
super-glob-40936.rs
track-diagnostics.rs
track-diagnostics.stderr
tuple-variadic-check.rs
tuple-variadic-check.stderr
unable-fulfill-trait.rs
unable-fulfill-trait.stderr
unescaped_backticks.rs
unescaped_backticks.stderr
unportable-markdown.rs Adjust expected errors for a rustdoc test 2024-08-18 22:52:54 -05:00
unportable-markdown.stderr Adjust expected errors for a rustdoc test 2024-08-18 22:52:54 -05:00
unused-extern-crate.rs
use_both_out_dir_and_output_options.rs
use_both_out_dir_and_output_options.stderr
wasm-safe.rs