Skip to content

Commit

Permalink
Add reference link
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jun 25, 2017
1 parent 9137153 commit bcf0d60
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/librustc_typeck/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4223,6 +4223,9 @@ As the error message indicates, only `u8` can be cast into `char`. Example:
let c = 86u8 as char; // ok!
assert_eq!(c, 'V');
```
For more information about casts, take a look at The Book:
https://doc.rust-lang.org/book/first-edition/casting-between-types.html
"##,

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

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

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

E0609: r##"
Expand Down

0 comments on commit bcf0d60

Please sign in to comment.