Skip to content

Commit 40b9352

Browse files
committed
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.
1 parent c217ab6 commit 40b9352

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/doc/book/casting-between-types.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ function result.
1616

1717
The most common case of coercion is removing mutability from a reference:
1818

19-
* `&mut T` to `&T`
19+
* `&mut T` to `&T`
2020

2121
An analogous conversion is to remove mutability from a
2222
[raw pointer](raw-pointers.md):
2323

24-
* `*mut T` to `*const T`
24+
* `*mut T` to `*const T`
2525

2626
References can also be coerced to raw pointers:
2727

28-
* `&T` to `*const T`
28+
* `&T` to `*const T`
2929

30-
* `&mut T` to `*mut T`
30+
* `&mut T` to `*mut T`
3131

3232
Custom coercions may be defined using [`Deref`](deref-coercions.md).
3333

@@ -59,11 +59,11 @@ A cast `e as U` is valid if `e` has type `T` and `T` *coerces* to `U`.
5959

6060
A cast `e as U` is also valid in any of the following cases:
6161

62-
* `e` has type `T` and `T` and `U` are any numeric types; *numeric-cast*
63-
* `e` is a C-like enum (with no data attached to the variants),
64-
and `U` is an integer type; *enum-cast*
65-
* `e` has type `bool` or `char` and `U` is an integer type; *prim-int-cast*
66-
* `e` has type `u8` and `U` is `char`; *u8-char-cast*
62+
* `e` has type `T` and `T` and `U` are any numeric types; *numeric-cast*
63+
* `e` is a C-like enum (with no data attached to the variants),
64+
and `U` is an integer type; *enum-cast*
65+
* `e` has type `bool` or `char` and `U` is an integer type; *prim-int-cast*
66+
* `e` has type `u8` and `U` is `char`; *u8-char-cast*
6767

6868
For example
6969

src/librustc_metadata/diagnostics.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ An unknown "kind" was specified for a link attribute. Erroneous code example:
5757
5858
Please specify a valid "kind" value, from one of the following:
5959
60-
* static
61-
* dylib
62-
* framework
60+
* static
61+
* dylib
62+
* framework
6363
6464
"##,
6565

src/librustc_typeck/diagnostics.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1378,8 +1378,8 @@ let x = |_| {}; // error: cannot determine a type for this expression
13781378
13791379
You have two possibilities to solve this situation:
13801380
1381-
* Give an explicit definition of the expression
1382-
* Infer the expression
1381+
* Give an explicit definition of the expression
1382+
* Infer the expression
13831383
13841384
Examples:
13851385

0 commit comments

Comments
 (0)