about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2024-07-10 00:37:12 -0400
committerGitHub <noreply@github.com>2024-07-10 00:37:12 -0400
commit85bd32cd69624f08105e1d45d2f8c3d711ffe69d (patch)
tree1b3dde288c09e9d298531cebc9caea9f7e30942d
parent74907296d8478337e975e2e58a5abc5f3350d77a (diff)
parentec662e7606c9d03de536bbf46dbdeb0d6140bc85 (diff)
downloadrust-85bd32cd69624f08105e1d45d2f8c3d711ffe69d.tar.gz
rust-85bd32cd69624f08105e1d45d2f8c3d711ffe69d.zip
Rollup merge of #127484 - ShE3py:rustdoc-doc-alias-whitespace-doc, r=fmease
`#[doc(alias)]`'s doc: say that ASCII spaces are allowed

PR #77570 allowed ASCII spaces in doc aliases, but the documentation wasn't updated to say so.

The code checking the aliases:
https://github.com/rust-lang/rust/blob/7fdefb804ec300fb605039522a7c0dfc9e7dc366/compiler/rustc_passes/src/check_attr.rs#L693-L704

``````@rustbot`````` label +A-docs
-rw-r--r--src/doc/rustdoc/src/advanced-features.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/doc/rustdoc/src/advanced-features.md b/src/doc/rustdoc/src/advanced-features.md
index 1733c8fc9a2..4a1c0916253 100644
--- a/src/doc/rustdoc/src/advanced-features.md
+++ b/src/doc/rustdoc/src/advanced-features.md
@@ -80,7 +80,8 @@ pub struct BigX;
 Then, when looking for it through the `rustdoc` search, if you enter "x" or
 "big", search will show the `BigX` struct first.
 
-There are some limitations on the doc alias names though: you can't use `"` or whitespace.
+There are some limitations on the doc alias names though: they cannot contain quotes (`'`, `"`)
+or most whitespace. ASCII space is allowed if it does not start or end the alias.
 
 You can add multiple aliases at the same time by using a list: