about summary refs log tree commit diff
path: root/src/doc/rustdoc
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-05-25 13:14:54 -0700
committerMichael Howell <michael@notriddle.com>2023-06-10 13:52:56 -0700
commit7a1154e15966145c360dfd2a5de424bddb74ca6c (patch)
tree40cb69e3a2436cd8d49dd8771f0b78e4f2cceffb /src/doc/rustdoc
parent2e569274d3ecbbc74d9c5b3a89a68ee09c19ef2f (diff)
downloadrust-7a1154e15966145c360dfd2a5de424bddb74ca6c.tar.gz
rust-7a1154e15966145c360dfd2a5de424bddb74ca6c.zip
rustdoc: update book with `[]` syntax
Diffstat (limited to 'src/doc/rustdoc')
-rw-r--r--src/doc/rustdoc/src/how-to-read-rustdoc.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/doc/rustdoc/src/how-to-read-rustdoc.md b/src/doc/rustdoc/src/how-to-read-rustdoc.md
index ccd77fb17e9..55cce8ab570 100644
--- a/src/doc/rustdoc/src/how-to-read-rustdoc.md
+++ b/src/doc/rustdoc/src/how-to-read-rustdoc.md
@@ -105,6 +105,11 @@ will match these queries:
 
 But it *does not* match `Result<Vec, u8>` or `Result<u8<Vec>>`.
 
+Function signature searches also support arrays and slices. The explicit name
+`primitive:slice<u8>` and `primitive:array<u8>` can be used to match a slice
+or array of bytes, while square brackets `[u8]` will match either one. Empty
+square brackets, `[]`, will match any slice regardless of what it contains.
+
 ### Shortcuts
 
 Pressing `S` while focused elsewhere on the page will move focus to the