diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-04-23 15:57:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-23 15:57:14 +0200 |
| commit | 4ae7037582f59b967275af80c06ddbba3414bdf7 (patch) | |
| tree | 0e7e7e76f3e39c9fb5d6fcca86828ae2cc38ff5e /src/librustc_error_codes/error_codes | |
| parent | 629a613faa65344163f922a7e95f6caaddf4ca5e (diff) | |
| parent | 57c2712895d547870694fdb3fc0b8a23e68a447f (diff) | |
Rollup merge of #71396 - DeeDeeG:improve-e0308-again, r=estebank
Improve E0308 error message wording again Hello again, I recently did this PR: #70242 I felt the error message could be further improved, so I made [a post on the Rust community forum](https://users.rust-lang.org/t/looking-for-feedback-on-an-improved-error-message-for-e0308/40004) to ask for feedback. (Also, there were some comments on my original PR that I took into consideration as well.) This PR is my attempt to take all the feedback into account and propose a better and simplified error message that should still be accurate. Its main benefit is having simpler grammar, and hopefully being easier to read and understand. Thanks to everyone who commented and gave feedback, and thank you for taking a look at this PR.
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0308.md | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/librustc_error_codes/error_codes/E0308.md b/src/librustc_error_codes/error_codes/E0308.md index b2c84370490..e2c40f03019 100644 --- a/src/librustc_error_codes/error_codes/E0308.md +++ b/src/librustc_error_codes/error_codes/E0308.md @@ -12,8 +12,7 @@ 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 happen in several cases, the most common being a mismatch -between the type that the compiler inferred for a variable based on its -initializing expression, on the one hand, and the type the author explicitly -assigned to the variable, on the other hand. +This error occurs when the compiler is unable to infer the concrete type of a +variable. It can occur in several cases, the most common being a mismatch +between two types: the type the author explicitly assigned, and the type the +compiler inferred. |
