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

Undo the backwards incompatable part of the fix for issue #30159 in PR #30294. #30324

Merged
merged 1 commit into from
Dec 13, 2015

Conversation

jseyfried
Copy link
Contributor

r? @nrc
Since PR #30294 unintentionally fixed issue #30159, it can cause breakage for a different reason than I originally stated in the PR (see #30159, I characterized the issue precisely there).

This commit limits the scope of the breakage to what I originally stated in the PR by "unfixing" the backwards incompatible part of #30159.

I think fixing #30159 has enough potential for breakage to warrant a crater run. If you disagree, I can cancel this PR, leaving it fixed.

@jseyfried jseyfried changed the title Undo the backwards incompatable part of the fix for issue #30159 in PR #30295. Undo the backwards incompatable part of the fix for issue #30159 in PR #30294. Dec 11, 2015
@nrc
Copy link
Member

nrc commented Dec 11, 2015

r+, but tests are failing

I do think we should land the breaking change, but agree a crater run first would be good.

@petrochenkov
Copy link
Contributor

If it's a bugfix, don't remove it completely, leave a warning at least.
Even if this warning is not going to be turned into an error, it still better, than compiler silently accepting wrong code.

@jseyfried
Copy link
Contributor Author

@nrc Fixed -- I was failing part of my own test from the first PR.

@jseyfried
Copy link
Contributor Author

@petrochenkov If we warned whenever the visibility got overwritten, that could lead to false positives -- warnings for code that would still be correct without the overwritten visibility.

We could avoid some of these false positives with some extra work, but it would be very difficult to avoid all of them. On second thought, we may decide that false positive warnings aren't that bad because they always can be fixed by reordering the imports so the globs come first.

Regardless, there is no point in implementing warnings and paying the cost of false positives if we are going to land the breaking change. Also, I want to land this PR asap since right now #30294 can break more than what is described in the merge commit.

@nrc
Copy link
Member

nrc commented Dec 13, 2015

@bors: r+

@bors
Copy link
Collaborator

bors commented Dec 13, 2015

📌 Commit de0de61 has been approved by nrc

@bors
Copy link
Collaborator

bors commented Dec 13, 2015

⌛ Testing commit de0de61 with merge c4c191a...

bors added a commit that referenced this pull request Dec 13, 2015
r? @nrc
Since PR #30294 unintentionally fixed issue #30159, it can cause breakage for a different reason than I originally stated in the PR (see #30159, I characterized the issue precisely there).

This commit limits the scope of the breakage to what I originally stated in the PR by "unfixing" the backwards incompatible part of #30159.

I think fixing #30159 has enough potential for breakage to warrant a crater run. If you disagree, I can cancel this PR, leaving it fixed.
@bors bors merged commit de0de61 into rust-lang:master Dec 13, 2015
jseyfried added a commit to jseyfried/rust that referenced this pull request Jan 31, 2016
bors added a commit that referenced this pull request Feb 1, 2016
This reverts PR #30324, fixing bug #30159 in which a public a glob import makes public any preceding imports that share a name with an item in the module being glob imported from.

For example,
```rust
pub fn f() {}
pub mod foo {
    fn f() {}
}

mod bar {
    use f;
    use f as g;
    pub use foo::*; // This makes the first import public but does not affect the second import.
}
```

This is a [breaking-change].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants