resolve: Remove artificial import ambiguity errors by petrochenkov · Pull Reques...
source link: https://github.com/rust-lang/rust/pull/112086
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Conversation
Contributor
Collaborator
r? @jackh726 (rustbot has picked a reviewer for you, use r? to override) |
added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
labels
added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
labels
Contributor
Author
Change description for the lang team.This PR removes unconditional errors that are currently reported if more than one candidate for a name is found during resolution of a Before this PR:
After this PR:
These errors are not technically necessary, but they were implemented in 2018 together with the new import semantic because some people were uncomfortable with name shadowing working in imports specifically. Now we are living with the new import resolution rules for nearly 5 years already, and it should be reasonable to expect that name shadowing that is possible in any other contexts is possible in import contexts too. Removal of these errors reduces chances of breaking changes when adding any new names to preludes, with Other ambiguity errors that may be reported during import resolution (glob vs macro-expanded name, etc) and that are actually necessary to prevent things like time travel, are not removed. |
added T-lang Relevant to the language team, which will review and decide on the PR/issue. S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). I-lang-nominated Indicates that an issue has been nominated for discussion during a lang team meeting.
and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
labels
Contributor
So this, using a glob import, will still be erroring? |
Contributor
Author
@est31
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=6492f42d9a13a034d74a720e219b516d |
removed the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label
Member
I was a bit confused by the I see that this also fails today
which I assume would also be resolved by this. But in general, today's meeting discussion seemed positive towards making the use lookup consistent with the type lookup, so @rfcbot fcp merge |
Team member @scottmcm has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised.
and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.
labels
This is now entering its final comment period, as per the review above. |
added S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete.
and removed S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). I-lang-nominated Indicates that an issue has been nominated for discussion during a lang team meeting.
labels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
No milestone
Successfully merging this pull request may close these issues.
Ambiguity errors in 2018 uniform import paths are not technically necessary
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK