diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2016-12-24 14:29:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-24 14:29:33 -0500 |
| commit | 637818fd858c30620afe8286f80d2c94b9aee07c (patch) | |
| tree | 3b39ebe2960becd276e7e07d759da94657bfccb4 | |
| parent | 8836a9da72073174aa1295952af2ad2475a88485 (diff) | |
| parent | 40b9352aa371d5984c7e84cad5e2f597dbecf177 (diff) | |
| download | rust-637818fd858c30620afe8286f80d2c94b9aee07c.tar.gz rust-637818fd858c30620afe8286f80d2c94b9aee07c.zip | |
Rollup merge of #38568 - chris-morgan:fix-markdown-lists, r=frewsxcv
Fix Markdown list formatting.
The Markdown engine used by the book can cope with a single leading space on the list marker:
Like this:
* List item
Rather than like this:
* List item
… but it’s not the typical convention employed in the book, and moreover the Markdown engine used for producing the error index *can’t* cope with it (its behaviour looks like a bug, as it appears to lose one of the two line breaks as well, but that’s immaterial here).
So, we shift to a single convention which doesn’t trigger bugs in the Markdown renderer.
----
See https://doc.rust-lang.org/error-index.html#E0458 and https://doc.rust-lang.org/error-index.html#E0101 for the bad current rendering in the error index.
| -rw-r--r-- | src/doc/book/casting-between-types.md | 18 | ||||
| -rw-r--r-- | src/librustc_metadata/diagnostics.rs | 6 | ||||
| -rw-r--r-- | src/librustc_typeck/diagnostics.rs | 4 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/doc/book/casting-between-types.md b/src/doc/book/casting-between-types.md index 296384ab6ef..a8f8224c58b 100644 --- a/src/doc/book/casting-between-types.md +++ b/src/doc/book/casting-between-types.md @@ -16,18 +16,18 @@ function result. The most common case of coercion is removing mutability from a reference: - * `&mut T` to `&T` +* `&mut T` to `&T` An analogous conversion is to remove mutability from a [raw pointer](raw-pointers.md): - * `*mut T` to `*const T` +* `*mut T` to `*const T` References can also be coerced to raw pointers: - * `&T` to `*const T` +* `&T` to `*const T` - * `&mut T` to `*mut T` +* `&mut T` to `*mut T` Custom coercions may be defined using [`Deref`](deref-coercions.md). @@ -59,11 +59,11 @@ A cast `e as U` is valid if `e` has type `T` and `T` *coerces* to `U`. A cast `e as U` is also valid in any of the following cases: - * `e` has type `T` and `T` and `U` are any numeric types; *numeric-cast* - * `e` is a C-like enum (with no data attached to the variants), - and `U` is an integer type; *enum-cast* - * `e` has type `bool` or `char` and `U` is an integer type; *prim-int-cast* - * `e` has type `u8` and `U` is `char`; *u8-char-cast* +* `e` has type `T` and `T` and `U` are any numeric types; *numeric-cast* +* `e` is a C-like enum (with no data attached to the variants), + and `U` is an integer type; *enum-cast* +* `e` has type `bool` or `char` and `U` is an integer type; *prim-int-cast* +* `e` has type `u8` and `U` is `char`; *u8-char-cast* For example diff --git a/src/librustc_metadata/diagnostics.rs b/src/librustc_metadata/diagnostics.rs index 6cf1a9e8a39..d3a2b6f1683 100644 --- a/src/librustc_metadata/diagnostics.rs +++ b/src/librustc_metadata/diagnostics.rs @@ -57,9 +57,9 @@ An unknown "kind" was specified for a link attribute. Erroneous code example: Please specify a valid "kind" value, from one of the following: - * static - * dylib - * framework +* static +* dylib +* framework "##, diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index 71507063ffc..2b17ac94b22 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -1378,8 +1378,8 @@ let x = |_| {}; // error: cannot determine a type for this expression You have two possibilities to solve this situation: - * Give an explicit definition of the expression - * Infer the expression +* Give an explicit definition of the expression +* Infer the expression Examples: |
