Uh oh!
There was an error while loading. Please reload this page.
Refactor global paths - #38232
Conversation
This is groundwork for hygiene 2.0, specifically hygienic global paths between crates. Since we will need the Alternatively, we could instead support hygienic global paths between crates by adding a field |
156a9b9 to
74b8d67Comparejseyfried
commented
Dec 8, 2016
bcd5a06 to
47eac3fComparepetrochenkov
commented
Dec 12, 2016
I wanted to review this PR, but forgot, sorry. Is the intent to eliminate |
Yeah, global paths should be hygienic by default for macros 2.0, so we won't need
This refactoring will allow us to use nearly the same logic to resolve
I haven't measured it, but I don't expect this to have a significant effect on hir stats. I could instead leave hir paths unchanged and just refactor ast paths -- IIRC refactoring hir paths only caused fallout in the lowerer and pretty printer.
|
47eac3f to
e8fe46aComparebors
commented
Dec 15, 2016
☔ The latest upstream changes (presumably #38375) made this pull request unmergeable. Please resolve the merge conflicts. |
ae2f1a8 to
550b4e1CompareThere was a problem hiding this comment.
I think I would like an is_global method on paths, rather than having checks like this (path.segments[0].identifier.name == keywords::CrateRoot.name()) scattered around the code. It will also make it easier for tools using the AST.
There was a problem hiding this comment.
Good point -- will do.
e9b84d0 to
0bd6eabComparebors
commented
Dec 21, 2016
☔ The latest upstream changes (presumably #38499) made this pull request unmergeable. Please resolve the merge conflicts. |
0bd6eab to
be2a531Comparejseyfried
commented
Dec 21, 2016
nrc
commented
Dec 21, 2016
r = me, but you have test failures now |
be2a531 to
8a1acb2Comparejseyfried
commented
Dec 22, 2016
@bors r=nrc |
bors
commented
Dec 22, 2016
📌 Commit 8a1acb2 has been approved by |
bors
commented
Dec 22, 2016
⌛ Testing commit 8a1acb2 with merge b86cb75... |
bors
commented
Dec 22, 2016
💔 Test failed - auto-mac-32-opt |
jseyfried
commented
Dec 23, 2016
@bors retry |
This PR removes the field
global: boolfromast::Pathandhir::Path, instead representing a global path::foo::baras{{root}}::foo::bar, where{{root}}is a virtual keywordkeywords::CrateRoot.Also, fixes#38016.
r? @nrc