about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorYoung-Flash <dongyang@apache.org>2024-07-19 23:01:52 +0800
committerYoung-Flash <dongyang@apache.org>2024-07-20 09:33:23 +0800
commit1669e930e19df3255ad40ff2e3e619e3f08051ab (patch)
tree47b02274aaeb35ce8862b60eed6f382bbc3468a9 /src
parent7bff592cad82bccf4de97bc2d2e0ce7f55037ab7 (diff)
downloadrust-1669e930e19df3255ad40ff2e3e619e3f08051ab.tar.gz
rust-1669e930e19df3255ad40ff2e3e619e3f08051ab.zip
minor: tweak comment
Diffstat (limited to 'src')
-rw-r--r--src/tools/rust-analyzer/crates/ide/src/inlay_hints/closing_brace.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/rust-analyzer/crates/ide/src/inlay_hints/closing_brace.rs b/src/tools/rust-analyzer/crates/ide/src/inlay_hints/closing_brace.rs
index 89654e40489..3e255adbe61 100644
--- a/src/tools/rust-analyzer/crates/ide/src/inlay_hints/closing_brace.rs
+++ b/src/tools/rust-analyzer/crates/ide/src/inlay_hints/closing_brace.rs
@@ -53,7 +53,8 @@ pub(super) fn hints(
         let module = ast::Module::cast(list.syntax().parent()?)?;
         (format!("mod {}", module.name()?), module.name().map(name))
     } else if let Some(label) = ast::Label::cast(node.clone()) {
-        // in this case, `ast::Label` could be seen as a part of `ast::BlockExpr`, to respect the `min_lines` config
+        // in this case, `ast::Label` could be seen as a part of `ast::BlockExpr`
+        // the actual number of lines in this case should be the line count of the parent BlockExpr, which the `min_lines` config care about
         node = node.parent()?;
         let block = label.syntax().parent().and_then(ast::BlockExpr::cast)?;
         closing_token = block.stmt_list()?.r_curly_token()?;