Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

ShE3py
Copy link
Contributor

@ShE3py ShE3py commented Jul 8, 2024

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();
if let Some(c) = doc_alias_str
.chars()
.find(|&c| c == '"' || c == '\'' || (c.is_whitespace() && c != ' '))
{
tcx.dcx().emit_err(errors::DocAliasBadChar { span, attr_str, char_: c });
return false;
}
if doc_alias_str.starts_with(' ') || doc_alias_str.ends_with(' ') {
tcx.dcx().emit_err(errors::DocAliasStartEnd { span, attr_str });
return false;
}

@rustbot label +A-docs

@rustbot
Copy link
Collaborator

rustbot commented Jul 8, 2024

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

@rustbot rustbot 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
@ShE3py ShE3py force-pushed the rustdoc-doc-alias-whitespace-doc branch from 686b034 to 1356424 Compare July 8, 2024 21:37
@ShE3py ShE3py force-pushed the rustdoc-doc-alias-whitespace-doc branch from 1356424 to ec662e7 Compare July 8, 2024 22:17
@fmease
Copy link
Member

fmease commented Jul 9, 2024

Thanks all!
@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 9, 2024

📌 Commit ec662e7 has been approved by fmease

It is now in the queue for this repository.

@bors bors 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
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:master Jul 10, 2024
6 checks passed
@rustbot rustbot 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools S-waiting-on-bors Status: 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