提交 40b9352a 编写于 作者: C Chris Morgan

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.
上级 c217ab6c
......@@ -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
......
......@@ -57,9 +57,9 @@
Please specify a valid "kind" value, from one of the following:
* static
* dylib
* framework
* static
* dylib
* framework
"##,
......
......@@ -1378,8 +1378,8 @@ fn main() {
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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册