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 f42648e commit 5021f10Copy full SHA for 5021f10
crates/ide_assists/src/handlers/remove_unused_param.rs
@@ -310,6 +310,36 @@ use super::foo;
310
fn bar() {
311
let _ = foo(1);
312
}
313
+"#,
314
+ )
315
+ }
316
+
317
+ #[test]
318
+ fn remove_method_param() {
319
+ // FIXME: This is completely wrong:
320
+ // * method call expressions are not handled
321
+ // * assoc function syntax removes the wrong argument.
322
+ check_assist(
323
+ remove_unused_param,
324
+ r#"
325
+struct S;
326
+impl S { fn f(&self, $0_unused: i32) {} }
327
+fn main() {
328
+ S.f(92);
329
+ S.f();
330
+ S.f(92, 92);
331
+ S::f(&S, 92);
332
+}
333
334
335
336
+impl S { fn f(&self) {} }
337
338
339
340
341
+ S::f(92);
342
343
"#,
344
)
345
0 commit comments