Skip to content

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

Merged
bors merged 1 commit into
rust-lang:masterfrom
ShE3py:rustdoc-doc-alias-whitespace-doc
Jul 10, 2024
Merged

#[doc(alias)]'s doc: say that ASCII spaces are allowed#127484
bors merged 1 commit into
rust-lang:masterfrom
ShE3py:rustdoc-doc-alias-whitespace-doc

Conversation

@ShE3py

@ShE3pyShE3py commented Jul 8, 2024

Copy link
Copy Markdown
Contributor

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

The code checking the aliases:

let doc_alias_str = doc_alias.as_str();
ifletSome(c) = doc_alias_str
.chars()
.find(|&c| c == '"' || c == '\'' || (c.is_whitespace() && c != ' '))
{
tcx.dcx().emit_err(errors::DocAliasBadChar{ span, attr_str,char_: c });
returnfalse;
}
if doc_alias_str.starts_with(' ') || doc_alias_str.ends_with(' '){
tcx.dcx().emit_err(errors::DocAliasStartEnd{ span, attr_str });
returnfalse;
}

@rustbot label +A-docs

@rustbot

Copy link
Copy Markdown
Collaborator

r? @fmease

rustbot has assigned @fmease.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools labels Jul 8, 2024
Comment threadsrc/doc/rustdoc/src/advanced-features.md Outdated
@ShE3py
ShE3pyforce-pushed the rustdoc-doc-alias-whitespace-doc branch from 686b034 to 1356424CompareJuly 8, 2024 21:37
@ShE3py
ShE3pyforce-pushed the rustdoc-doc-alias-whitespace-doc branch from 1356424 to ec662e7CompareJuly 8, 2024 22:17
@fmease

fmease commented Jul 9, 2024

Copy link
Copy Markdown
Member

Thanks all!
@bors r+ rollup

@bors

bors commented Jul 9, 2024

Copy link
Copy Markdown
Collaborator

📌 Commit ec662e7 has been approved by fmease

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 9, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 9, 2024
…e-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
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 9, 2024
…iaskrgr
Rollup of 8 pull requests
Successful merges:
- rust-lang#127028 (Fix regression in the MIR lowering of or-patterns)
- rust-lang#127091 (impl FusedIterator and a size hint for the error sources iter)
- rust-lang#127358 (Automatically taint when reporting errors from ItemCtxt)
- rust-lang#127382 (Use verbose style when suggesting changing `const` with `let`)
- rust-lang#127397 (fix interleaved output in the default panic hook when multiple threads panic simultaneously)
- rust-lang#127484 (`#[doc(alias)]`'s doc: say that ASCII spaces are allowed)
- rust-lang#127496 (Update `f16`/`f128` FIXMEs that needed `(NEG_)INFINITY`)
- rust-lang#127508 (small search graph refactor)
r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 9, 2024
…e-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
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 9, 2024
…e-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
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 9, 2024
…iaskrgr
Rollup of 7 pull requests
Successful merges:
- rust-lang#127091 (impl FusedIterator and a size hint for the error sources iter)
- rust-lang#127358 (Automatically taint when reporting errors from ItemCtxt)
- rust-lang#127382 (Use verbose style when suggesting changing `const` with `let`)
- rust-lang#127484 (`#[doc(alias)]`'s doc: say that ASCII spaces are allowed)
- rust-lang#127495 (More trait error reworking)
- rust-lang#127496 (Update `f16`/`f128` FIXMEs that needed `(NEG_)INFINITY`)
- rust-lang#127508 (small search graph refactor)
r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 9, 2024
…e-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
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 9, 2024
…iaskrgr
Rollup of 10 pull requests
Successful merges:
- rust-lang#124339 (allow overwriting the output of `rustc --version`)
- rust-lang#125627 (migration lint for `expr2024` for the edition 2024)
- rust-lang#127091 (impl FusedIterator and a size hint for the error sources iter)
- rust-lang#127358 (Automatically taint when reporting errors from ItemCtxt)
- rust-lang#127484 (`#[doc(alias)]`'s doc: say that ASCII spaces are allowed)
- rust-lang#127495 (More trait error reworking)
- rust-lang#127496 (Update `f16`/`f128` FIXMEs that needed `(NEG_)INFINITY`)
- rust-lang#127508 (small search graph refactor)
- rust-lang#127521 (Remove spastorino from SMIR)
- rust-lang#127532 (documentation: update cmake version)
r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 9, 2024
…e-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
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 9, 2024
…iaskrgr
Rollup of 8 pull requests
Successful merges:
- rust-lang#127091 (impl FusedIterator and a size hint for the error sources iter)
- rust-lang#127358 (Automatically taint when reporting errors from ItemCtxt)
- rust-lang#127484 (`#[doc(alias)]`'s doc: say that ASCII spaces are allowed)
- rust-lang#127495 (More trait error reworking)
- rust-lang#127496 (Update `f16`/`f128` FIXMEs that needed `(NEG_)INFINITY`)
- rust-lang#127508 (small search graph refactor)
- rust-lang#127521 (Remove spastorino from SMIR)
- rust-lang#127532 (documentation: update cmake version)
r? `@ghost`
`@rustbot` modify labels: rollup
@jhprattjhpratt mentioned this pull request Jul 10, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 10, 2024
…e-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
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 10, 2024
Rollup of 8 pull requests
Successful merges:
- rust-lang#124211 (Bump `elided_lifetimes_in_associated_constant` to deny)
- rust-lang#125627 (migration lint for `expr2024` for the edition 2024)
- rust-lang#127091 (impl FusedIterator and a size hint for the error sources iter)
- rust-lang#127461 (Fixup failing fuchsia tests)
- rust-lang#127484 (`#[doc(alias)]`'s doc: say that ASCII spaces are allowed)
- rust-lang#127508 (small search graph refactor)
- rust-lang#127521 (Remove spastorino from SMIR)
- rust-lang#127532 (documentation: update cmake version)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 85bd32c into rust-lang:masterJul 10, 2024
@rustbotrustbot added this to the 1.81.0 milestone Jul 10, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jul 10, 2024
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
@ShE3py
ShE3py deleted the rustdoc-doc-alias-whitespace-doc branch May 3, 2025 12:18
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@ShE3py@rustbot@fmease@bors@tgross35