We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ddcdb8 commit 63751d1Copy full SHA for 63751d1
crates/ra_assists/src/handlers/remove_dbg.rs
@@ -126,4 +126,25 @@ fn foo(n: usize) {
126
"dbg!(n.checked_sub(4))",
127
);
128
}
129
+
130
+ #[test]
131
+ fn remove_dbg_leave_semicolon() {
132
+ // https://github.com/rust-analyzer/rust-analyzer/issues/5129#issuecomment-651399779
133
+ // not quite though
134
+ let code = "
135
+let res = <|>dbg!(1 * 20); // needless comment
136
+";
137
+ let expected = "
138
+let res = 1 * 20; // needless comment
139
140
+ check_assist(remove_dbg, code, expected);
141
+ }
142
143
144
+ fn remove_dbg_keep_expression() {
145
146
+let res = <|>dbg!(a + b).foo();";
147
+ let expected = "let res = (a + b).foo();";
148
149
150
0 commit comments