-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Error correction for missing idents #31065
Conversation
r? @jroesch (rust_highfive has picked a reviewer for you, use r? to override) |
r? @pnkfelix |
@@ -282,10 +282,6 @@ pub fn validate_crate_name(sess: Option<&Session>, s: &str, sp: Option<Span>) { | |||
if c == '_' { continue } | |||
say(&format!("invalid character `{}` in crate name: `{}`", c, s)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh, I take it from your changes above that we're better off just dying as soon as we see the first invalid character rather than printing them all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, that was not intentional. I'll fix this.
@nrc seems like a win overall. r=me after you decide whether or not to take my suggestion about the name of |
@bors: r=pnkfelix |
📌 Commit 43b3681 has been approved by |
⌛ Testing commit 43b3681 with merge 6ff8f62... |
💔 Test failed - auto-mac-64-opt |
@bors: retry On Mon, Jan 25, 2016 at 12:42 PM, bors [email protected] wrote:
|
This PR adds some minor error correction to the parser - if there is a missing ident, we recover and carry on. It also makes compilation more robust so that non-fatal errors (which is still most of them, unfortunately) in parsing do not cause us to abort compilation. The effect is that a program with a missing or incorrect ident can get all the way to type checking.
This PR adds some minor error correction to the parser - if there is a missing ident, we recover and carry on. It also makes compilation more robust so that non-fatal errors (which is still most of them, unfortunately) in parsing do not cause us to abort compilation. The effect is that a program with a missing or incorrect ident can get all the way to type checking.