-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[move-compiler] Add macro for "simple" visitors #20062
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had some rustfmt issues, that I wasn't able to solve very cleanly. If anyone knows alternatives, please let me know!
@@ -327,6 +327,51 @@ impl<V: CFGIRVisitorConstructor + Send + Sync> CFGIRVisitor for V { | |||
} | |||
} | |||
|
|||
macro_rules! simple_visitor { | |||
($visitor:ident, $($overrides:item),*) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need the ,*
to get rustfmt to work
@@ -66,8 +41,7 @@ impl TypingVisitorContext for Context<'_> { | |||
} | |||
} | |||
false | |||
} | |||
|
|||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rustfmt adds the , here regardless of the declaration syntax when using parens at the invocation
self.env.pop_warning_filter_scope() | ||
} | ||
|
||
simple_visitor!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have simple_visitor!(
instead of something like simple_visitor! {
to enable rustfmt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Test plan
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.