about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2017-06-25 09:25:37 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2017-06-25 09:25:37 +0200
commitbcf0d600f3884709c5faef21219a7613e254b7e0 (patch)
treee4dd1f77557131aa1af5cd966f35708a24eee7d3
parent9137153e4725649443ac02f742424aa5737d15b6 (diff)
Add reference link
-rw-r--r--src/librustc_typeck/diagnostics.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs
index f9b44f0395f..b2fa2cc7c61 100644
--- a/src/librustc_typeck/diagnostics.rs
+++ b/src/librustc_typeck/diagnostics.rs
@@ -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##"
@@ -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##"
@@ -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##"
@@ -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##"