resolve: improve diagnostics and lay groundwork for resolving before ast->hir#33190
resolve: improve diagnostics and lay groundwork for resolving before ast->hir#33190bors merged 3 commits intorust-lang:masterfrom
Conversation
fa24baf to
56dbe74
Compare
There was a problem hiding this comment.
We used to emit two notes for an conflicting imported constant -- one where the conflict was imported and another where the conflict was defined. For all other conflict errors, we only emit where the conflicting imported item was imported.
There was a problem hiding this comment.
I can re-implement the original behavior if desired, but I think it's better to be consistent and only emit one note.
|
@GSam If you're still interested in maintaining / improving the refactoring tool, feel free to ping me and we can design a different API. |
|
cc @nrc |
|
cc @aochagavia who's working on refactoring things now. |
|
I am not using the resolve functionality at the moment and am not sure if it will be necessary in the future, so I am ok with this. |
|
☔ The latest upstream changes (presumably #33232) made this pull request unmergeable. Please resolve the merge conflicts. |
56dbe74 to
a70e42a
Compare
|
r? @nrc |
|
@bors: r+ |
|
📌 Commit a70e42a has been approved by |
resolve: improve diagnostics and lay groundwork for resolving before ast->hir This PR improves diagnostics in `resolve` and lays some groundwork for resolving before ast->hir. More specifically, - It removes an API in `resolve` intended for external refactoring tools (see #27493) that appears not to be in active use. The API is incompatible with resolving before ast->hir, but could be rewritten in a more compatible and less intrusive way. - It improves the diagnostics for pattern bindings that conflict with `const`s. - It improves the diagnostics for modules used as expressions (fixes #33186). - It refactors away some uses of the hir map, which is unavavailable before ast->hir lowering. r? @eddyb
|
💔 Test failed - auto-win-gnu-32-opt |
This PR improves diagnostics in
resolveand lays some groundwork for resolving before ast->hir.More specifically,
resolveintended for external refactoring tools (see Changes required to help facilitate a refactoring tool #27493) that appears not to be in active use. The API is incompatible with resolving before ast->hir, but could be rewritten in a more compatible and less intrusive way.consts.r? @eddyb