mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
add failing test test_introduce_var_block_expr_second_to_last
This commit is contained in:
parent
a901cb4f34
commit
a996b66cc6
1 changed files with 17 additions and 0 deletions
|
@ -141,4 +141,21 @@ fn foo() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_introduce_var_block_expr_second_to_last() {
|
||||||
|
check_assist_range(
|
||||||
|
introduce_variable,
|
||||||
|
"
|
||||||
|
fn foo() {
|
||||||
|
<|>{ let x = 0; x }<|>
|
||||||
|
something_else();
|
||||||
|
}",
|
||||||
|
"
|
||||||
|
fn foo() {
|
||||||
|
let <|>var_name = { let x = 0; x };
|
||||||
|
var_name
|
||||||
|
something_else();
|
||||||
|
}",
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue