about summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2019-04-25 13:20:43 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2019-04-25 13:20:43 +0200
commit6aa5a5df965db2d6f567fe34a316b5f4e0234c15 (patch)
tree2cc15b88ec0f080903badec1cc6d51138b1778cc /src/librustdoc/html
parentf199627e69baccdb44f41e945d189aa04d0df022 (diff)
downloadrust-6aa5a5df965db2d6f567fe34a316b5f4e0234c15.tar.gz
rust-6aa5a5df965db2d6f567fe34a316b5f4e0234c15.zip
Improvement comment explanations
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/render.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs
index 703f7b18d16..bd74789b65b 100644
--- a/src/librustdoc/html/render.rs
+++ b/src/librustdoc/html/render.rs
@@ -1319,8 +1319,11 @@ fn write_minify_replacer<W: Write>(
                             f,
                             "R",
                             Token::Char(ReservedChar::Backline),
-                            // This closure prevents crates' name to be aggregated. It allows to not
-                            // have to look for crate's name into the strings array.
+                            // This closure prevents crates' names from being aggregated.
+                            //
+                            // The point here is to check if the string is preceded by '[' and
+                            // "searchIndex". If so, it means this is a crate name and that it
+                            // shouldn't be aggregated.
                             |tokens, pos| {
                                 pos < 2 ||
                                 !tokens[pos - 1].is_char(ReservedChar::OpenBracket) ||