1
Fork 0

Rollup merge of #126994 - Alexendoo:explain-markdown, r=tgross35

Support lists and stylings in more places for `rustc --explain`

Adds support for `*foo*`, stylings not immediately following whitespace e.g. ``(`Foo`)`` and lists starting with whitespace:

```md
* previously supported
```
```md
 * now also supported
 ```

These are fairly common in the existing error docs, some before/after examples:

### E0460

![image](https://github.com/rust-lang/rust/assets/1830331/4d0dc5dd-b71f-48b1-97ae-9f7199e952ed)
![image](https://github.com/rust-lang/rust/assets/1830331/4bbcb1e4-99ba-4d0d-b338-fe19d96a5eb1)

### E0059

![image](https://github.com/rust-lang/rust/assets/1830331/8457f69a-3126-4777-aa4a-953f7b29f59b)
![image](https://github.com/rust-lang/rust/assets/1830331/ac2189f8-512e-4b3b-886d-6c4a619d17f2)
This commit is contained in:
Matthias Krüger 2024-07-23 19:42:35 +02:00 committed by GitHub
commit 8e206c0387
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 96 additions and 36 deletions

View file

@ -70,4 +70,4 @@ fn spawn<F: Future + Send + 'static>(future: F) {
Similarly to closures, `async` blocks are not executed immediately and may
capture closed-over data by reference. For more information, see
https://rust-lang.github.io/async-book/03_async_await/01_chapter.html.
<https://rust-lang.github.io/async-book/03_async_await/01_chapter.html>.

View file

@ -20,7 +20,7 @@ where
The `DispatchFromDyn` trait currently can only be implemented for
builtin pointer types and structs that are newtype wrappers around them
— that is, the struct must have only one field (except for`PhantomData`),
— that is, the struct must have only one field (except for `PhantomData`),
and that field must itself implement `DispatchFromDyn`.
```