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

Fix star handling in block doc comments #93038

Merged
merged 2 commits into from
Jan 20, 2022

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Jan 18, 2022

Fixes #92872.

Some extra explanation about this PR and why #92357 created this regression: when we merge doc comment kinds for example in:

/// he
/**
* hello
*/
#[doc = "boom"]

We don't want to remove the empty lines between them. However, to correctly compute the "horizontal trim", we still need it, so instead, I put back a part of the "vertical trim" directly in the "horizontal trim" computation so it doesn't impact the output buffer but allows us to correctly handle the stars.

r? @camelid

@GuillaumeGomez GuillaumeGomez added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jan 18, 2022
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 18, 2022
@rust-highfive
Copy link
Collaborator

Some changes occurred in clean/types.rs.

cc @camelid

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 18, 2022
@camelid
Copy link
Member

camelid commented Jan 18, 2022

Sorry, I don't think I'll have time to review this. I already have a lot of PRs to review.

r? @notriddle

@rust-highfive rust-highfive assigned notriddle and unassigned camelid Jan 18, 2022
Copy link
Contributor

@notriddle notriddle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors r+

@camelid
Copy link
Member

camelid commented Jan 19, 2022

@notriddle you need to write the r+ in a regular comment for bors to notice it.

@notriddle
Copy link
Contributor

@bors r+

Thanks…

@bors
Copy link
Contributor

bors commented Jan 19, 2022

📌 Commit 06b00ad has been approved by notriddle

@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 Jan 19, 2022
@GuillaumeGomez
Copy link
Member Author

I'll put it in the rollup. :)

@bors: p=rollup

@GuillaumeGomez
Copy link
Member Author

@bors: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 20, 2022
…askrgr

Rollup of 13 pull requests

Successful merges:

 - rust-lang#89747 (Add MaybeUninit::(slice_)as_bytes(_mut))
 - rust-lang#89764 (Fix variant index / discriminant confusion in uninhabited enum branching)
 - rust-lang#91606 (Stabilize `-Z print-link-args` as `--print link-args`)
 - rust-lang#91694 (rustdoc: decouple stability and const-stability)
 - rust-lang#92183 (Point at correct argument when async fn output type lifetime disagrees with signature)
 - rust-lang#92582 (improve `_` constants in item signature handling)
 - rust-lang#92680 (intra-doc: Use the impl's assoc item where possible)
 - rust-lang#92704 (Change lint message to be stronger for &T -> &mut T transmute)
 - rust-lang#92861 (Rustdoc mobile: put out-of-band info on its own line)
 - rust-lang#92992 (Help optimize out backtraces when disabled)
 - rust-lang#93038 (Fix star handling in block doc comments)
 - rust-lang#93108 (:arrow_up: rust-analyzer)
 - rust-lang#93112 (Fix CVE-2022-21658)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 20, 2022
…r=notriddle

Fix star handling in block doc comments

Fixes rust-lang#92872.

Some extra explanation about this PR and why rust-lang#92357 created this regression: when we merge doc comment kinds for example in:

```rust
/// he
/**
* hello
*/
#[doc = "boom"]
```

We don't want to remove the empty lines between them. However, to correctly compute the "horizontal trim", we still need it, so instead, I put back a part of the "vertical trim" directly in the "horizontal trim" computation so it doesn't impact the output buffer but allows us to correctly handle the stars.

r? ``@camelid``
@bors bors merged commit 6c627d2 into rust-lang:master Jan 20, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 20, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 21, 2022
…askrgr

Rollup of 17 pull requests

Successful merges:

 - rust-lang#91032 (Introduce drop range tracking to generator interior analysis)
 - rust-lang#92856 (Exclude "test" from doc_auto_cfg)
 - rust-lang#92860 (Fix errors on blanket impls by ignoring the children of generated impls)
 - rust-lang#93038 (Fix star handling in block doc comments)
 - rust-lang#93061 (Only suggest adding `!` to expressions that can be macro invocation)
 - rust-lang#93067 (rustdoc mobile: fix scroll offset when jumping to internal id)
 - rust-lang#93086 (Add tests to ensure that `let_chains` works with `if_let_guard`)
 - rust-lang#93087 (Fix src/test/run-make/raw-dylib-alt-calling-convention)
 - rust-lang#93091 (⬆ chalk to 0.76.0)
 - rust-lang#93094 (src/test/rustdoc-json: Check for `struct_field`s in `variant_tuple_struct.rs`)
 - rust-lang#93098 (Show a more informative panic message when `DefPathHash` does not exist)
 - rust-lang#93099 (rustdoc: auto create output directory when "--output-format json")
 - rust-lang#93102 (Pretty printer algorithm revamp step 3)
 - rust-lang#93104 (Support --bless for pp-exact pretty printer tests)
 - rust-lang#93114 (update comment for `ensure_monomorphic_enough`)
 - rust-lang#93128 (Add script to prevent point releases with same number as existing ones)
 - rust-lang#93136 (Backport the 1.58.1 release notes to master)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@GuillaumeGomez GuillaumeGomez deleted the block-doc-comments branch January 21, 2022 17:40
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

regression: rustdoc interprets the * in /** */ doc comments as literal Markdown
6 participants