about summary refs log tree commit diff
path: root/src/test/rustdoc-ui/coverage/enum-tuple.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-12-28 13:53:34 +0000
committerbors <bors@rust-lang.org>2022-12-28 13:53:34 +0000
commit266eef77011234af6e612cf2bf22441112f1f90e (patch)
treeb2e1e978f585a2d5279333b0e19875502dcaec33 /src/test/rustdoc-ui/coverage/enum-tuple.rs
parentd98e714988d9beebe416c6e3808e4173d928c5ed (diff)
parentfae19a9a79ad275af9e9f2ee5ad15404a9a1bbf7 (diff)
downloadrust-266eef77011234af6e612cf2bf22441112f1f90e.tar.gz
rust-266eef77011234af6e612cf2bf22441112f1f90e.zip
Auto merge of #10119 - koka831:doc/config-default-value, r=xFrednet
fix codeblocks in the document

While I've looked into https://github.com/rust-lang/rust-clippy/issues/9990, I found broken code blocks in the document.

This patch not only improves visibility, but also fixes a potential bug. When a lint description ends with code block, the string will have three backquotes at the end.
Since the current implementation prints the default value immediately after that, the markdown renderer is unable to properly close the code block.

e.g. `arithmetic_side_effects`, we can see code block is not rendered properly, and (I think) it's bit hard to understand what ``"defaults to `[]`"`` is meant.

![2022-12-26_01-51](https://user-images.githubusercontent.com/14945055/209476342-4d0b2e18-44b6-4c74-8c3c-4f4f0904e8ca.png)

In this PR, it will be rendered as:

![image](https://user-images.githubusercontent.com/14945055/209476353-07587b86-1100-445f-946d-41f62f741e51.png)

changelog: none

r? `@xFrednet`
Diffstat (limited to 'src/test/rustdoc-ui/coverage/enum-tuple.rs')
0 files changed, 0 insertions, 0 deletions