Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/add_missing_impl_members.rs')
| -rw-r--r-- | crates/ide-assists/src/handlers/add_missing_impl_members.rs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/crates/ide-assists/src/handlers/add_missing_impl_members.rs b/crates/ide-assists/src/handlers/add_missing_impl_members.rs index 7e03eb3030..d0ad2fa4f1 100644 --- a/crates/ide-assists/src/handlers/add_missing_impl_members.rs +++ b/crates/ide-assists/src/handlers/add_missing_impl_members.rs @@ -2470,4 +2470,39 @@ impl b::Checker for MyChecker { }"#, ); } + + #[test] + fn test_parameter_names_matching_macros_not_qualified() { + check_assist( + add_missing_impl_members, + r#" +trait Foo { + fn foo(&self, vec: usize); + fn bar(&self, format: String, panic: bool); +} + +struct Bar; + +impl Foo for Bar {$0} +"#, + r#" +trait Foo { + fn foo(&self, vec: usize); + fn bar(&self, format: String, panic: bool); +} + +struct Bar; + +impl Foo for Bar { + fn foo(&self, vec: usize) { + ${0:todo!()} + } + + fn bar(&self, format: String, panic: bool) { + todo!() + } +} +"#, + ); + } } |