mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Add a cov_mark
This commit is contained in:
parent
89f015ead9
commit
a8ca4666f1
@ -51,6 +51,7 @@ pub(crate) fn on_enter(db: &RootDatabase, position: FilePosition) -> Option<Text
|
|||||||
if let Some(edit) = find_node_at_offset(file.syntax(), position.offset - TextSize::of('{'))
|
if let Some(edit) = find_node_at_offset(file.syntax(), position.offset - TextSize::of('{'))
|
||||||
.and_then(|block| on_enter_in_block(block, position))
|
.and_then(|block| on_enter_in_block(block, position))
|
||||||
{
|
{
|
||||||
|
cov_mark::hit!(indent_block_contents);
|
||||||
return Some(edit);
|
return Some(edit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -346,6 +347,7 @@ fn main() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn indents_fn_body_block() {
|
fn indents_fn_body_block() {
|
||||||
|
cov_mark::check!(indent_block_contents);
|
||||||
do_check(
|
do_check(
|
||||||
r#"
|
r#"
|
||||||
fn f() {$0()}
|
fn f() {$0()}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user