-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
this code
fn main(){
let value = 20;
let m = match value {
20 => true,
40 => false,
_ => false
}
println!("{}", m);
}
give this error message:
C:\depot>rustc ex.rs
ex.rs:9:5: 9:12 error: expected one of `.`, `;`, `?`, or an operator, found `println`
ex.rs:9 println!("{}", m);
^~~~~~~
error: aborting due to previous error
ideally, the error is something like this:
C:\depot>rustc ex.rs
ex.rs:7:5: 7:12 error: expected one of `.`, `;`, `?`, or an operator after '}' token
ex.rs:7 }
^~
error: aborting due to previous error
srinivasreddy, jseyfried, panicbit and Powersource
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.