Skip to content

Resolve: stop letting items shadow reexported glob imports - #31376

Closed
jseyfried wants to merge 1 commit into
rust-lang:masterfrom
jseyfried:disallow_shadowing
Closed

Resolve: stop letting items shadow reexported glob imports#31376
jseyfried wants to merge 1 commit into
rust-lang:masterfrom
jseyfried:disallow_shadowing

Conversation

@jseyfried

Copy link
Copy Markdown
Contributor

This PR stops non-import items from shadowing glob-imported re-exports (fixes#31337) and fixes the fallout in the standard libraries and tests.

Previously, it was possible to shadow a glob-imported re-export, so this a [breaking-chage]. For example,

mod foo {pubfng(){}pubuseself::g as f;}use foo::*;// This breaks, since the imported re-export conflicts with the following item.fnf(){}

The breakage can be fixed by renaming the non-import item or by using single imports in place of the glob import.
r? @nrc

@jseyfried
jseyfriedforce-pushed the disallow_shadowing branch 2 times, most recently from ae640ef to a118b6aCompareFebruary 3, 2016 05:18
@nrcnrc added the S-waiting-on-crater Status: Waiting on a crater run to be completed. label Feb 3, 2016
@nrc

nrc commented Feb 3, 2016

Copy link
Copy Markdown
Member

cc @rust-lang/lang

@nrcnrc added I-nominated T-lang Relevant to the language team labels Feb 3, 2016
@retep998

Copy link
Copy Markdown
Contributor

Per my other comment here a crater run wouldn't notice breakages to projects that glob import winapi.

@petrochenkov

Copy link
Copy Markdown
Contributor

Yeah, the breakage looks bad (still would be interested to see crater results).

@bors

bors commented Feb 11, 2016

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #31461) made this pull request unmergeable. Please resolve the merge conflicts.

@jseyfried
jseyfriedforce-pushed the disallow_shadowing branch 3 times, most recently from 03d9c78 to 1ae0233CompareFebruary 11, 2016 08:10
@jseyfried

Copy link
Copy Markdown
ContributorAuthor

rebased

@nikomatsakis

Copy link
Copy Markdown
Contributor

Since we decided not to "fix" the current behavior, I believe this PR should be closed. Correct me if I am mistaken.

@jseyfried
jseyfried deleted the disallow_shadowing branch March 25, 2016 22:53
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-craterStatus: Waiting on a crater run to be completed.T-langRelevant to the language team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Items shadow glob-imported reexports

6 participants

@jseyfried@nrc@retep998@petrochenkov@bors@nikomatsakis