Skip to content

add section saying that code inside macro should be formatted - #13163

Closed
ShahakShama wants to merge 1 commit into
shahak/style-guide-add-future-pendingfrom
shahak/style-guide-formatting-macros
Closed

ShahakShama wants to merge 1 commit into
shahak/style-guide-add-future-pendingfrom
shahak/style-guide-formatting-macros

Conversation

@ShahakShama

@ShahakShama ShahakShama commented Mar 11, 2026 •

Copy link
Copy Markdown
Contributor

Note

Low Risk
Low risk documentation-only change that does not affect runtime behavior or APIs.

Overview
Adds a new “Formatting Macros” subsection to style.md noting that rustfmt does not format Rust code inside macro invocations (e.g., stream!, indexmap!) and recommending manually formatting that code (with a tip to temporarily move it outside the macro to run rustfmt).

Written by Cursor Bugbot for commit fe86990. This will update automatically on new commits. Configure here.

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

ShahakShama commented Mar 11, 2026 •

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ShahakShama
ShahakShama force-pushed the shahak/style-guide-formatting-macros branch from 80950a2 to 97d5e33 Compare March 15, 2026 14:58
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-add-future-pending branch from d87dabb to fc7de22 Compare March 16, 2026 07:38
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-formatting-macros branch from 97d5e33 to e5fe0b7 Compare March 16, 2026 07:38

@Stavbe Stavbe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Stavbe made 1 comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on ShahakShama).


style.md line 456 at r1 (raw file):

`rustfmt` does not format code inside macro invocations. This applies to any macro that contains Rust code,
such as `lazy_static!`, `stream!`, etc. Make sure the code inside the macro is formatted correctly.

remove, since we asked to not use it

Code quote:

`lazy_static!`

@ShahakShama ShahakShama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@ShahakShama made 1 comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on Stavbe).


style.md line 456 at r1 (raw file):

Previously, Stavbe wrote…

remove, since we asked to not use it

Done.

@ShahakShama
ShahakShama force-pushed the shahak/style-guide-formatting-macros branch from e5fe0b7 to fe86990 Compare March 26, 2026 07:20

@Stavbe Stavbe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Stavbe reviewed 1 file and all commit messages, and resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on ShahakShama).

@ShahakShama
ShahakShama force-pushed the shahak/style-guide-formatting-macros branch 2 times, most recently from d1d1f87 to e4f0c02 Compare April 9, 2026 12:12
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-add-future-pending branch from 7229846 to a01ff41 Compare April 9, 2026 12:12
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-formatting-macros branch from e4f0c02 to 89d6451 Compare April 9, 2026 12:15
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-add-future-pending branch from a01ff41 to 444bf2c Compare April 9, 2026 12:15
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-formatting-macros branch from 89d6451 to a352d6a Compare April 13, 2026 10:51
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-add-future-pending branch from 444bf2c to 85b29c4 Compare April 13, 2026 10:51
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-formatting-macros branch from a352d6a to 7722496 Compare April 15, 2026 05:53
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-formatting-macros branch from 7722496 to a06b86a Compare April 28, 2026 13:43
@github-actions

Copy link
Copy Markdown

There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale.
This PR will be closed and locked in 7 days if no further activity occurs.
Thank you for your contributions!

@github-actions github-actions Bot added the stale label May 29, 2026
@github-actions github-actions Bot closed this Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants