-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix(zero_repeat_side_effects): better identify exprs with side effects #15814
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
fix(zero_repeat_side_effects): better identify exprs with side effects #15814
Conversation
help: consider performing the side effect separately | ||
| | ||
LL - vec![f(); 0]; | ||
LL + { f(); vec![] as std::vec::Vec<i32> }; |
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.
This is such an ugly suggestion… Never mind.
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.
Actually, I can improve it just a bit -- since the original expression is in a statement, I can safely remove the block around the suggestion. Should I do it in this PR, or in a separate one?
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 was going to say in the same PR, but doing it in another PR looks better as it has nothing to do with the current PR. Assign it to me if you take on it.
de5c437
to
adff9ba
Compare
Fixes #14681
changelog: [
zero_repeat_side_effects
]: better identify exprs with side effects