Skip to content

Conversation

shulaoda
Copy link
Contributor

closes #6287

Since this is special support for a specific crate macro, we should handle both forms — lazy_static! and lazy_static::lazy_static!.

Copy link
Member

@fee1-dead fee1-dead left a comment

Choose a reason for hiding this comment

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

I think this is good to merge, @ytmimi thoughts?

@Manishearth
Copy link
Member

This technically impacts formatted code. I don't know what our decision matrix is for stuff like this.

Also, at this point I don't know if we need to fix it, lazy_static is somewhat deprecated since there are equivalent stdlib types.

@ytmimi
Copy link
Contributor

ytmimi commented Oct 10, 2025

I think The changes to lazy_static::lazy_static! would need to be gated behind style_edition=2027.

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.

Formatting inside the lazy_static! macro did not work when the macro is used with the crate name: lazy_static::lazy_static!

5 participants