Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update error messages #1737

Merged
merged 1 commit into from
Sep 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ch02-00-guessing-game-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ error[E0308]: mismatched types
--> src/main.rs:23:21
|
23 | match guess.cmp(&secret_number) {
| ^^^^^^^^^^^^^^ expected struct `std::string::String`, found integral variable
| ^^^^^^^^^^^^^^ expected struct `std::string::String`, found integer
|
= note: expected type `&std::string::String`
= note: found type `&{integer}`
Expand Down
4 changes: 2 additions & 2 deletions src/ch03-05-control-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ error[E0308]: mismatched types
--> src/main.rs:4:8
|
4 | if number {
| ^^^^^^ expected bool, found integral variable
| ^^^^^^ expected bool, found integer
|
= note: expected type `bool`
found type `{integer}`
Expand Down Expand Up @@ -239,7 +239,7 @@ error[E0308]: if and else have incompatible types
6 | | } else {
7 | | "six"
8 | | };
| |_____^ expected integral variable, found &str
| |_____^ expected integer, found &str
|
= note: expected type `{integer}`
found type `&str`
Expand Down
4 changes: 2 additions & 2 deletions src/ch10-01-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ error[E0308]: mismatched types
--> src/main.rs:7:38
|
7 | let wont_work = Point { x: 5, y: 4.0 };
| ^^^ expected integral variable, found
floating-point variable
| ^^^ expected integer, found
floating-point number
|
= note: expected type `{integer}`
found type `{float}`
Expand Down
2 changes: 1 addition & 1 deletion src/ch13-01-closures.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ error[E0308]: mismatched types
|
| let n = example_closure(5);
| ^ expected struct `std::string::String`, found
integral variable
integer
|
= note: expected type `std::string::String`
found type `{integer}`
Expand Down