about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2020-08-28 16:45:25 -0700
committerJosh Triplett <josh@joshtriplett.org>2023-07-21 02:57:51 -0700
commit9362ae1616e98b08a88dcb806a11a366ed1c6b8b (patch)
tree60efbfdf52c8d8b8cbe6fcc7aeb9b82a25a0a176
parent9539af86c31b05a83cde43bb888a2232decf73d4 (diff)
downloadrust-9362ae1616e98b08a88dcb806a11a366ed1c6b8b.tar.gz
rust-9362ae1616e98b08a88dcb806a11a366ed1c6b8b.zip
Clarify guide for unbraced closures, regarding comments
-rw-r--r--src/doc/style-guide/src/expressions.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/style-guide/src/expressions.md b/src/doc/style-guide/src/expressions.md
index 1870b194d9d..0d4b97895cd 100644
--- a/src/doc/style-guide/src/expressions.md
+++ b/src/doc/style-guide/src/expressions.md
@@ -125,8 +125,8 @@ expression of the closure. Between the `|`s, use function definition syntax,
 but elide types where possible.
 
 Use closures without the enclosing `{}`, if possible. Add the `{}` when you have
-a return type, when there are statements, when there are comments in the body,
-or when the body expression spans multiple lines and is a control-flow
+a return type, when there are statements, when there are comments inside the
+closure, or when the body expression spans multiple lines and is a control-flow
 expression. If using braces, follow the rules above for blocks. Examples:
 
 ```rust