-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTF-let_elseIssues related to let-else statements (RFC 3137)Issues related to let-else statements (RFC 3137)P-lowLow priorityLow priorityT-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
error: expected identifier, found keyword `return`
--> /home/gh-estebank/rust/compiler/rustc_lint/src/default_could_be_derived.rs:249:13
|
248 | let hir::VariantData::Struct { fields, recovered: Recovered::No } = data {
| ---- while parsing this struct
249 | return;
| ^^^^^^ expected identifier, found keyword
|
help: escape `return` to use it as an identifier
|
249 | r#return;
| ++
This should detect that there's a missing else
: = data else {
.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTF-let_elseIssues related to let-else statements (RFC 3137)Issues related to let-else statements (RFC 3137)P-lowLow priorityLow priorityT-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.