Skip to content

Conversation

GuillaumeGomez
Copy link
Member

Fixes #90618.

This is because .iter().all(|c| c == '*') returns true if there is no character checked. And in case the last line has only one character, it simply returns true, making the last line behind removed.

@GuillaumeGomez GuillaumeGomez added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Nov 6, 2021
@rust-highfive
Copy link
Contributor

r? @davidtwco

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 6, 2021
@GuillaumeGomez
Copy link
Member Author

r? @jyn514

@rust-highfive rust-highfive assigned jyn514 and unassigned davidtwco Nov 6, 2021
@GuillaumeGomez GuillaumeGomez force-pushed the one-char-last-line-removed branch from d267a87 to aa6f6f4 Compare November 6, 2021 19:21
@camelid camelid changed the title One char last line removed Fix bug with #[doc] string single-character last lines Nov 6, 2021
@jyn514
Copy link
Member

jyn514 commented Nov 7, 2021

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 7, 2021

📌 Commit aa6f6f4 has been approved by jyn514

@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 Nov 7, 2021
@bors
Copy link
Collaborator

bors commented Nov 7, 2021

⌛ Testing commit aa6f6f4 with merge df8241381c2c29fe5899f211a53c2125c86c165e...

@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@GuillaumeGomez
Copy link
Member Author

@bors: retry

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 8, 2021
…emoved, r=jyn514

Fix bug with `#[doc]` string single-character last lines

Fixes rust-lang#90618.

This is because `.iter().all(|c| c == '*')` returns `true` if there is no character checked. And in case the last line has only one character, it simply returns `true`, making the last line behind removed.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 8, 2021
…emoved, r=jyn514

Fix bug with `#[doc]` string single-character last lines

Fixes rust-lang#90618.

This is because `.iter().all(|c| c == '*')` returns `true` if there is no character checked. And in case the last line has only one character, it simply returns `true`, making the last line behind removed.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 8, 2021
…emoved, r=jyn514

Fix bug with `#[doc]` string single-character last lines

Fixes rust-lang#90618.

This is because `.iter().all(|c| c == '*')` returns `true` if there is no character checked. And in case the last line has only one character, it simply returns `true`, making the last line behind removed.
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 9, 2021
…laumeGomez

Rollup of 4 pull requests

Successful merges:

 - rust-lang#90494 (ARMv6K Horizon OS panic change)
 - rust-lang#90652 (use filter(|x| matches!(..)) instead of filter_map(|x| match x ... => Some(xy)))
 - rust-lang#90657 (Fix bug with `#[doc]` string single-character last lines)
 - rust-lang#90689 (:arrow_up: rust-analyzer)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d9fc7d1 into rust-lang:master Nov 9, 2021
@rustbot rustbot added this to the 1.58.0 milestone Nov 9, 2021
@GuillaumeGomez GuillaumeGomez deleted the one-char-last-line-removed branch November 9, 2021 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustdoc cuts off the last line in a #[doc] attribute if it only has a single character
8 participants