Skip to content

Commit 1669e93

Browse files
committed
minor: tweak comment
1 parent 7bff592 commit 1669e93

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/rust-analyzer/crates/ide/src/inlay_hints/closing_brace.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ pub(super) fn hints(
5353
let module = ast::Module::cast(list.syntax().parent()?)?;
5454
(format!("mod {}", module.name()?), module.name().map(name))
5555
} else if let Some(label) = ast::Label::cast(node.clone()) {
56-
// in this case, `ast::Label` could be seen as a part of `ast::BlockExpr`, to respect the `min_lines` config
56+
// in this case, `ast::Label` could be seen as a part of `ast::BlockExpr`
57+
// the actual number of lines in this case should be the line count of the parent BlockExpr, which the `min_lines` config care about
5758
node = node.parent()?;
5859
let block = label.syntax().parent().and_then(ast::BlockExpr::cast)?;
5960
closing_token = block.stmt_list()?.r_curly_token()?;

0 commit comments

Comments
 (0)