-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Steps towards fixing #11983. #14548
Steps towards fixing #11983. #14548
Conversation
In cases such as libsyntax with the ast, you generally have to import so many things that it's easier to just refer to everything via Also, is #11983 the issue you meant to refer to? It seems to reference libstd rather than libsyntax. Thanks for doing this by the way! |
use ast::{TypeMethod, TyU, TyU8, TyU16, TyU32, TyU64, UintTy}; | ||
use ast::{UnBox, UnDeref, UnNeg, UnNot, UnOp, UnUniq}; | ||
use ast::{ViewItem, ViewItemExternCrate, ViewItemUse}; | ||
use ast::{ViewPath, ViewPathGlob, ViewPathList, ViewPathSimple, Visibility}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dear god that's a lot of imports.
This seems like the perfect example of where glob imports are appropriate.
The issue is the one that I wanted to refer to, because at some point, someone mentions doing this in the compiler in addition to simply in the library. And I think the library is mostly clean already. And I'll switch to using As for the philosophy of glob imports, I'm interested in seeing what this ends up looking like inside the rust compiler, since once they are removed from there, it's possible to see an example of a large codebase without globs and will help determine the usefulness of the feature. I'll keep the pull request open and push to it for feedback as I work more on it. |
This fixes all of the files in this directory, so it's complete enough to be considered for approval and I can do other directories as separate requests. |
Feel free to ping the PR whenever you update it, sadly github doesn't send out any notifications for a force push :( |
I was testing it to see if it failed and apparently there was a test failure on master that was causing the test runs to fail. Though, I'll remember that for next time. |
Closing due to inactivity, but feel free to reopen with a rebase! |
minor: Bump smol-str
This isn't actually a fully-fledged pull request, but I'd like to make sure that this is the right direction for de-globbing?