mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
repro
This commit is contained in:
parent
baa5cd9527
commit
f662d8bf38
2 changed files with 28 additions and 1 deletions
|
@ -5,7 +5,7 @@ exclude = ["crates/proc_macro_test/imp"]
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
# Disabling debug info speeds up builds a bunch,
|
# Disabling debug info speeds up builds a bunch,
|
||||||
# and we don't rely on it for debugging that much.
|
# and we don't rely on it for debugging that much.
|
||||||
debug = 0
|
debug = 2
|
||||||
|
|
||||||
[profile.dev.package]
|
[profile.dev.package]
|
||||||
# These speed up local tests.
|
# These speed up local tests.
|
||||||
|
|
|
@ -4394,6 +4394,33 @@ pub fn testfn(arg: &mut Foo) {
|
||||||
fn $0fun_name(arg: &mut Foo) {
|
fn $0fun_name(arg: &mut Foo) {
|
||||||
arg.field = 8;
|
arg.field = 8;
|
||||||
}
|
}
|
||||||
|
"#,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn extract_function_copies_comments() {
|
||||||
|
check_assist(
|
||||||
|
extract_function,
|
||||||
|
r#"
|
||||||
|
fn func() {
|
||||||
|
let i = 0;
|
||||||
|
$0
|
||||||
|
// comment here!
|
||||||
|
let x = 0;
|
||||||
|
$0
|
||||||
|
}
|
||||||
|
"#,
|
||||||
|
r#"
|
||||||
|
fn func() {
|
||||||
|
let i = 0;
|
||||||
|
fun_name();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn $0fun_name() {
|
||||||
|
// comment here!
|
||||||
|
let x = 0;
|
||||||
|
}
|
||||||
"#,
|
"#,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue