Uh oh!
There was an error while loading. Please reload this page.
Add name bindings for bad imports - #31338
Conversation
rust-highfive
commented
Feb 1, 2016
(rust_highfive has picked a reviewer for you, use r? to override) |
alexcrichton
commented
Feb 1, 2016
r? @nrc I have a feeling you'll have a much better idea what's going on here than I |
nrc
commented
Feb 1, 2016
lgtm, what is still left to do? Adding a test or two seems like the only obvious thing to me. |
dirk
commented
Feb 1, 2016
@nrc: I'll definitely add some tests! 😉 Overall, though, do you think I took the right approach with adding the additional fields to |
nrc
commented
Feb 1, 2016
Yeah, I think it is a fine approach. I'm slightly surprised there isn't an error def in there somewhere. In particular if a name ends up mapping to one of these dummy imports, how do we prevent type checking issuing further errors about it? |
dirk
commented
Feb 1, 2016
I was surprised about that myself. It may turn out we need to make one. I'll write up tests for this tonight and we can see how those turn out.
I'm still getting familiar with the compiler internals so this may be completely wrong, but doesn't the compiler exit after reporting all the name/import/etc. resolution errors and not progress on to the type-checking stage? |
nrc
commented
Feb 1, 2016
It used to, but I've been working on this recently and now will get all the way to type checking before bailing out most of the time. |
dirk
commented
Feb 2, 2016
@nrc: As of 250ffcb it actually works! 🎉 Now just to write some proper test(s) for it. |
88ef9fc to
ab0b930Comparedirk
commented
Feb 2, 2016
@nrc: Tests are updated for the new behavior; I think this is ready for your review. |
c5658d1 to
e7f0c95CompareThere was a problem hiding this comment.
nit: the previous style is more idiomatic
e7f0c95 to
18e0d1aCompareThere was a problem hiding this comment.
s/resolve_import_resolving_error/import_resolving_error
nrc
commented
Feb 3, 2016
LGTM. Could you fix the remaining nits and squash the commits please? |
18e0d1a to
026bcbfComparedirk
commented
Feb 3, 2016
@nrc: Fixed and squashed! |
nrc
commented
Feb 3, 2016
Thanks! @bors: r+ |
bors
commented
Feb 3, 2016
📌 Commit 026bcbf has been approved by |
bors
commented
Feb 3, 2016
…=nrc WIP implementation of #31209. The goal is to insert fake/dummy definitions for names that we failed to import so that later resolver stages won't complain about them.
WIP implementation of #31209.
The goal is to insert fake/dummy definitions for names that we failed to import so that later resolver stages won't complain about them.