mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 14:13:58 +00:00
Add multiple file edit tes to remove_unused_param assist
This commit is contained in:
parent
d5775b320c
commit
949c580d1b
1 changed files with 33 additions and 0 deletions
|
@ -128,4 +128,37 @@ fn main() { foo(9, 2) }
|
||||||
"#,
|
"#,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn remove_across_files() {
|
||||||
|
check_assist(
|
||||||
|
remove_unused_param,
|
||||||
|
r#"
|
||||||
|
//- /main.rs
|
||||||
|
fn foo(x: i32, <|>y: i32) { x; }
|
||||||
|
|
||||||
|
mod foo;
|
||||||
|
|
||||||
|
//- /foo.rs
|
||||||
|
use super::foo;
|
||||||
|
|
||||||
|
fn bar() {
|
||||||
|
let _ = foo(1, 2);
|
||||||
|
}
|
||||||
|
"#,
|
||||||
|
r#"
|
||||||
|
//- /main.rs
|
||||||
|
fn foo(x: i32) { x; }
|
||||||
|
|
||||||
|
mod foo;
|
||||||
|
|
||||||
|
//- /foo.rs
|
||||||
|
use super::foo;
|
||||||
|
|
||||||
|
fn bar() {
|
||||||
|
let _ = foo(1);
|
||||||
|
}
|
||||||
|
"#,
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue