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

Do not reorder module declaration with #![macro_use] #4284

Merged
merged 2 commits into from
Jun 29, 2020

Conversation

topecongiro
Copy link
Contributor

Close #4275.

Comment on lines -125 to -128
// Skip visiting sub modules when the input is from stdin.
if self.recursive {
self.visit_mod_from_ast(&krate.module)?;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, this conditional is dropped because we need to parse the mods even when recursive is false in order to be able to see the inner attributes on the mods so that reordering can be done safely, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's correct.

Copy link
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Would it be better to have "reorder_modules" default to false?
3 participants