rust/src
bors 6dab6dc5fc 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)
2023-07-05 06:18:46 +00:00
..
bootstrap Auto merge of #112697 - tgross35:explain-markdown, r=oli-obk 2023-07-05 06:18:46 +00:00
ci Remove MIPS host CI workflows 2023-07-02 22:04:46 -07:00
doc Update platform-support.md 2023-07-03 11:16:47 +01:00
etc User may want to skip tidy check sometimes 2023-06-30 15:37:10 +08:00
librustdoc remove TypeWellFormedFromEnv 2023-07-03 21:40:04 +00:00
llvm-project@22897bce7b Update to LLVM 16.0.5 2023-06-05 14:19:09 +02:00
rustdoc-json-types Verify that ItemEnum can be serialized and then deserialized using bincode 2023-05-22 18:26:20 +01:00
tools Auto merge of #113303 - compiler-errors:yeet-chalk, r=lcnr 2023-07-04 09:09:09 +00:00
README.md Remove stale reference to the test suite location 2023-01-13 11:49:06 +00:00
stage0.json Bump to latest beta compiler 2023-05-30 08:00:10 -04:00
version Bump to 1.72.0 2023-05-27 14:23:37 -04:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.