about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/asm.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-05 06:18:46 +0000
committerbors <bors@rust-lang.org>2023-07-05 06:18:46 +0000
commit6dab6dc5fcd9655adfa7bfb3e59e5cae487184d2 (patch)
treee0db27e4c7f547bc92e3d239d3872a5ecc0f90b8 /compiler/rustc_codegen_llvm/src/asm.rs
parent9227ff28aff55b252314076fcf21c9a66f10ac1e (diff)
parent6a1c10bd85442f52f1d55d51005481cfa5cb40b5 (diff)
downloadrust-6dab6dc5fcd9655adfa7bfb3e59e5cae487184d2.tar.gz
rust-6dab6dc5fcd9655adfa7bfb3e59e5cae487184d2.zip
Auto merge of #112697 - tgross35:explain-markdown, r=oli-obk
Add simple markdown formatting to `rustc --explain` output

This is a second attempt at #104540, which is #63128 without dependencies.

This PR adds basic markdown formatting to `rustc --explain` output when available. Currently, the output just displays raw markdown: this works of course, but it really doesn't look very elegant. (output is `rustc --explain E0038`)

<img width="583" alt="image" src="https://github.com/rust-lang/rust/assets/13724985/ea418117-47af-455b-83c0-6fc59276efee">

After this patch, sample output from the same file:

<img width="693" alt="image" src="https://github.com/rust-lang/rust/assets/13724985/12f7bf9b-a3fe-4104-b74b-c3e5227f3de9">

This also obeys the `--color always/auto/never` command option. Behavior:

- If pager is available and supports color, print with formatting to the pager
- If pager is not available or fails print with formatting to stdout - otherwise without formatting
- Follow `--color always/never` if suppied
- If everything fails, just print plain text to stdout

r? `@oli-obk`
cc `@estebank`
(since the two of you were involved in the previous discussion)
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/asm.rs')
0 files changed, 0 insertions, 0 deletions