Skip to content

Commit c585d26

Browse files
committed
update test
1 parent 231b8ab commit c585d26

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

src/tools/rust-analyzer/crates/ide-assists/src/handlers/add_missing_impl_members.rs

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2473,34 +2473,32 @@ impl b::Checker for MyChecker {
24732473

24742474
#[test]
24752475
fn test_parameter_names_matching_macros_not_qualified() {
2476+
// Parameter names that match macro names should not be qualified
24762477
check_assist(
24772478
add_missing_impl_members,
24782479
r#"
2479-
trait Foo {
2480-
fn foo(&self, vec: usize);
2481-
fn bar(&self, format: String, panic: bool);
2480+
//- /lib.rs crate:dep
2481+
#[macro_export]
2482+
macro_rules! my_macro {
2483+
() => {}
2484+
}
2485+
2486+
pub trait Foo {
2487+
fn foo(&self, my_macro: usize);
24822488
}
24832489
2490+
//- /main.rs crate:main deps:dep
24842491
struct Bar;
24852492
2486-
impl Foo for Bar {$0}
2493+
impl dep::Foo for Bar {$0}
24872494
"#,
24882495
r#"
2489-
trait Foo {
2490-
fn foo(&self, vec: usize);
2491-
fn bar(&self, format: String, panic: bool);
2492-
}
2493-
24942496
struct Bar;
24952497
2496-
impl Foo for Bar {
2497-
fn foo(&self, vec: usize) {
2498+
impl dep::Foo for Bar {
2499+
fn foo(&self, my_macro: usize) {
24982500
${0:todo!()}
24992501
}
2500-
2501-
fn bar(&self, format: String, panic: bool) {
2502-
todo!()
2503-
}
25042502
}
25052503
"#,
25062504
);

0 commit comments

Comments
 (0)