-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Forbid glob-importing from a type alias #32134
Conversation
I could also make this a warning for a warning cycle. |
also compiles. |
Good point, I'll forbid that too. |
Thanks @jseyfried! I'll run crater to see what kind of fallout we're looking at. |
Looks like there are six root regressions, but it looks like most of those are actually just rooted in my own mistake. I'm personally always a fan of aggressive bug fixing, so I would be ok with pushing forward without a warning cycle, but others might feel differently! So in terms of code, r=me, but in terms of scheduling/warning, I'll defer to @rust-lang/lang |
er, r? @nikomatsakis |
To put the numbers into context, 12/13 regressions were fixed by the new versions of libgit2-sys I just published, so it seems like a relatively low-impact change to me. It's definitely "weird" code that would exercise this. |
The remaining regression is in |
76781d8
to
1a6092e
Compare
The import should have had no effect and will become an error once rust-lang/rust#32134 lands.
I think most everyone would agree this is a straight-up bug fix and it's ok to Just Fix It. |
@bors r+ |
📌 Commit 1a6092e has been approved by |
…atsakis Forbid glob-importing from a type alias This PR forbids glob-importing from a type alias or trait (fixes #30560): ```rust type Alias = (); use Alias::*; // This is currently allowed but shouldn't be ``` This is a [breaking-change]. Since the disallowed glob imports don't actually import anything, any breakage can be fixed by removing the offending glob import. r? @alexcrichton
This PR forbids glob-importing from a type alias or trait (fixes #30560):
This is a [breaking-change]. Since the disallowed glob imports don't actually import anything, any breakage can be fixed by removing the offending glob import.
r? @alexcrichton