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.

@fee1-dead
Copy link
Member

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

@shulaoda can you do this? I think it would be good to merge after.

@shulaoda shulaoda requested a review from fee1-dead October 13, 2025 02:40
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.

LGTM

@Manishearth Manishearth enabled auto-merge October 13, 2025 06:22
@Manishearth Manishearth merged commit 9e90cfb into rust-lang:master Oct 13, 2025
26 checks passed
@ytmimi ytmimi added the release-notes Needs an associated changelog entry label Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes Needs an associated changelog entry

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