about summary refs log tree commit diff
path: root/src/librustc_error_codes/error_codes
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-03-18 18:03:33 +0100
committerGitHub <noreply@github.com>2020-03-18 18:03:33 +0100
commit8188b2163dfe3de7b8e3b52ee86c9c2eac78ffa1 (patch)
treec12bf3492828b1851fc7e3af3d3b0e34dd48e6f3 /src/librustc_error_codes/error_codes
parent56106847dac4f563053eb34dda66ee281948671a (diff)
parent64460a12af8786a1859279d2944fd2fc67a3a159 (diff)
downloadrust-8188b2163dfe3de7b8e3b52ee86c9c2eac78ffa1.tar.gz
rust-8188b2163dfe3de7b8e3b52ee86c9c2eac78ffa1.zip
Rollup merge of #69139 - GuillaumeGomez:cleanup-e0308, r=Dylan-DPC
clean up E0308 explanation

r? @Dylan-DPC
Diffstat (limited to 'src/librustc_error_codes/error_codes')
-rw-r--r--src/librustc_error_codes/error_codes/E0308.md14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/librustc_error_codes/error_codes/E0308.md b/src/librustc_error_codes/error_codes/E0308.md
index a907ca27297..7d87d54194e 100644
--- a/src/librustc_error_codes/error_codes/E0308.md
+++ b/src/librustc_error_codes/error_codes/E0308.md
@@ -1,10 +1,6 @@
-This error occurs when the compiler was unable to infer the concrete type of a
-variable. It can occur for several cases, the most common of which is a
-mismatch in the expected type that the compiler inferred for a variable's
-initializing expression, and the actual type explicitly assigned to the
-variable.
+Expected type did not match the received type.
 
-For example:
+Erroneous code example:
 
 ```compile_fail,E0308
 let x: i32 = "I am not a number!";
@@ -15,3 +11,9 @@ let x: i32 = "I am not a number!";
 //      |
 //    type `i32` assigned to variable `x`
 ```
+
+This error occurs when the compiler was unable to infer the concrete type of a
+variable. It can occur for several cases, the most common of which is a
+mismatch in the expected type that the compiler inferred for a variable's
+initializing expression, and the actual type explicitly assigned to the
+variable.