Skip to content

Commit

Permalink
Unrolled build for rust-lang#127484
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#127484 - ShE3py:rustdoc-doc-alias-whitespace-doc, r=fmease

`#[doc(alias)]`'s doc: say that ASCII spaces are allowed

PR rust-lang#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
  • Loading branch information
rust-timer authored Jul 10, 2024
2 parents 7caf672 + ec662e7 commit 88c274f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/doc/rustdoc/src/advanced-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit 88c274f

Please sign in to comment.