]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Rollup merge of #93038 - GuillaumeGomez:block-doc-comments, r=notriddle
authorMatthias Krüger <matthias.krueger@famsik.de>
Thu, 20 Jan 2022 16:10:41 +0000 (17:10 +0100)
committerGitHub <noreply@github.com>
Thu, 20 Jan 2022 16:10:41 +0000 (17:10 +0100)
commit6c627d25f67846c80231fb7c61ab655f710f3313
treecf107a4c3b52252fb37e0399aab1adb112a69b65
parent1cb57e2d2b6400ed6fb6d498cb5639fe6fd5d984
parent06b00ad19972c18150fe25a9b3716ffdf5300a83
Rollup merge of #93038 - GuillaumeGomez:block-doc-comments, r=notriddle

Fix star handling in block doc comments

Fixes #92872.

Some extra explanation about this PR and why https://github.com/rust-lang/rust/pull/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`
src/librustdoc/clean/types.rs