diff --git a/src/doc/book/casting-between-types.md b/src/doc/book/casting-between-types.md index 296384ab6efd9507921cfa06e0e6ddc660e3e84a..a8f8224c58b81e3ca43c6b83bccfb2aa8715e712 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 6cf1a9e8a390d183e158012749bf6a8e393cfa8b..d3a2b6f1683e228994ae2c66d84836edac885b6e 100644 --- a/src/librustc_metadata/diagnostics.rs +++ b/src/librustc_metadata/diagnostics.rs @@ -57,9 +57,9 @@ 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 71507063ffc43cd8296dc6454a28745e14d2ef21..2b17ac94b2238fea3bc93fdb2278658b9713b1df 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -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: