-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add remove literal dbg stmt for remove_dbg #20354
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
Add remove literal dbg stmt for remove_dbg #20354
Conversation
|
That |
It seems that due to |
No? Removing it can't change code meaning, even if it's not |
Example side-effect Drop implement or Drop out of await point |
I think we can safely ignore that. Assists are not required to never change code meaning, and this side-effect is rarely a problem. |
ok |
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.
Can you squash please?
Remove only contain literals dbg statement ```rust fn foo() { let n = 2; $0dbg!(3); dbg!(2.6); dbg!(1, 2.5); dbg!('x'); dbg!(&n); dbg!(n); // needless comment dbg!("foo");$0 } ``` -> ```rust fn foo() { // needless comment } ``` Old: ```rust fn foo() { 3; 2.6; (1, 2.5); 'x'; &n; n; // needless comment "foo"; } ```
26f834e
to
75fd004
Compare
Ok |
Thanks! |
Remove only contain literals dbg statement
->
Old: