-
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
Make name resolution errors non-fatal #30320
Conversation
r? @jroesch (rust_highfive has picked a reviewer for you, use r? to override) |
cc @rust-lang/compiler anyone can review this, I don't think it needs any special knowledge. I'd be grateful if anyone has the time. |
@@ -16,6 +16,7 @@ fn matcher1(x: opts) { | |||
match x { | |||
opts::a(ref i) | opts::b(i) => {} | |||
//~^ ERROR variable `i` is bound with different mode in pattern #2 than in pattern #1 | |||
//~^^ ERROR mismatched types |
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.
Sounds like these should be kept as typeck errors and removed from resolve.
This looks good to me. I agree with @eddyb that reporting an error in the case of |
r+ modulo that question. |
Seems easy enough to change to only giving a type mismatch error in that case (I hacked the change and we didn't fail any tests). However the error message is a fair bit less informative and it seems tricky to add that information to the type mismatch error, so in this case I'd be in favour of leaving the duplicate errors (or trying to suppress the type mismatch, but that is trickier and best left as a follow-up). |
📌 Commit 18b4fe0 has been approved by |
⌛ Testing commit 18b4fe0 with merge 7aa94a2... |
💔 Test failed - auto-mac-64-nopt-t |
@bors: retry On Mon, Dec 14, 2015 at 7:59 PM, bors [email protected] wrote:
|
We can now handle name resolution errors and get past type checking (if we're a bit lucky). This is the first step towards doing code completion for partial programs (we need error recovery in the parser and early access to save-analysis).
I was thinking of trying to suppress the type mismatch, yes. OK. |
We can now handle name resolution errors and get past type checking (if we're a bit lucky). This is the first step towards doing code completion for partial programs (we need error recovery in the parser and early access to save-analysis).
We can now handle name resolution errors and get past type checking (if we're a bit lucky). This is the first step towards doing code completion for partial programs (we need error recovery in the parser and early access to save-analysis).
We can now handle name resolution errors and get past type checking (if we're a bit lucky). This is the first step towards doing code completion for partial programs (we need error recovery in the parser and early access to save-analysis).