Skip to content

Conversation

topecongiro
Copy link
Contributor

Close #4266.

match mac.path.segments.first() {
Some(first_segment) => {
if first_segment.ident.name != Symbol::intern("cfg_if") {
match mac.path.segments.last() {
Copy link
Member

Choose a reason for hiding this comment

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

I assume the first to last change will still allow support for cfg_if::cfg_if! and cfg_if! correct?

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, I added to support self-importing like pub use cfg_if::cfg_if; in the root file and using cfg_if! as crate::cfg_if!.

Copy link
Member

Choose a reason for hiding this comment

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

Even better! Changes LGTM, CI failures seem to just be due to the configuration snippet tests needing lazy_static

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the catch! Fixed in 5c7cb94.

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.

👍

@topecongiro topecongiro merged commit 9cdb827 into rust-lang:master Jun 22, 2020
@topecongiro topecongiro deleted the cfg-if-symbol branch June 22, 2020 12:59
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.

cargo fmt stopped working since 1.44.0
3 participants