Skip to content

Commit bcf0d60

Browse files
Add reference link
1 parent 9137153 commit bcf0d60

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/librustc_typeck/diagnostics.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4223,6 +4223,9 @@ As the error message indicates, only `u8` can be cast into `char`. Example:
42234223
let c = 86u8 as char; // ok!
42244224
assert_eq!(c, 'V');
42254225
```
4226+
4227+
For more information about casts, take a look at The Book:
4228+
https://doc.rust-lang.org/book/first-edition/casting-between-types.html
42264229
"##,
42274230

42284231
E0605: r##"
@@ -4249,6 +4252,9 @@ x as u32; // ok!
42494252
let v = 0 as *const u8;
42504253
v as *const i8; // ok!
42514254
```
4255+
4256+
For more information about casts, take a look at The Book:
4257+
https://doc.rust-lang.org/book/first-edition/casting-between-types.html
42524258
"##,
42534259

42544260
E0606: r##"
@@ -4268,6 +4274,9 @@ other. Example:
42684274
let x = &0u8;
42694275
let y: u32 = *x as u32; // We dereference it first and then cast it.
42704276
```
4277+
4278+
For more information about casts, take a look at The Book:
4279+
https://doc.rust-lang.org/book/first-edition/casting-between-types.html
42714280
"##,
42724281

42734282
E0607: r##"
@@ -4292,6 +4301,9 @@ objects are DSTs. In the case of slices, the additional information the fat
42924301
pointer holds is their size.
42934302
42944303
To fix this error, don't try to cast directly between thin and fat pointers.
4304+
4305+
For more information about casts, take a look at The Book:
4306+
https://doc.rust-lang.org/book/first-edition/casting-between-types.html
42954307
"##,
42964308

42974309
E0609: r##"

0 commit comments

Comments
 (0)