Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve: stop letting items shadow reexported glob imports #31376

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
6 participants
@jseyfried
Copy link
Contributor

jseyfried commented Feb 3, 2016

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 {
    pub fn g() {}
    pub use self::g as f;
}

use foo::*; // This breaks, since the imported re-export conflicts with the following item.
fn f() {}

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 jseyfried force-pushed the jseyfried:disallow_shadowing branch 2 times, most recently from ae640ef to a118b6a Feb 3, 2016

@nrc

This comment has been minimized.

Copy link
Member

nrc commented Feb 3, 2016

@jseyfried jseyfried force-pushed the jseyfried:disallow_shadowing branch from a118b6a to 1c9446f Feb 3, 2016

@retep998

This comment has been minimized.

Copy link
Member

retep998 commented Feb 3, 2016

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

@petrochenkov

This comment has been minimized.

Copy link
Contributor

petrochenkov commented Feb 3, 2016

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

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 11, 2016

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

@jseyfried jseyfried force-pushed the jseyfried:disallow_shadowing branch 3 times, most recently from 03d9c78 to 1ae0233 Feb 11, 2016

@jseyfried

This comment has been minimized.

Copy link
Contributor Author

jseyfried commented Feb 12, 2016

rebased

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Feb 12, 2016

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 jseyfried:disallow_shadowing branch Mar 25, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.