Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #13261 - antonilol:fix-doc-code-blocks, r=xFrednet
fix code blocks in doc comments inconsistently using 3 or 4 spaces of indentation The metadata collector script was treating the space lines all start with as indentation. This caused code block's triple backticks to get a space in front of it, like this: ``` ```rust ^ this space ``` Code after that that is indented with 4 spaces will only have 3 of those rendered. Example (taken from [here](https://rust-lang.github.io/rust-clippy/master/index.html#/missing_panics_doc)): ```rust ... pub fn divide_by(x: i32, y: i32) -> i32 { if y == 0 { // 3 spaces panic!("Cannot divide by 0") // 7 spaces ... ``` Also added 'compile_fail' alongside the other rustdoc directives (second code block [here](https://rust-lang.github.io/rust-clippy/master/index.html#/macro_metavars_in_unsafe) had no highlighting), fixed a doc comment using 'rs' instead of 'rust' and removed some spaces causing an extra missing space of indentation (see second code block [here](https://rust-lang.github.io/rust-clippy/master/index.html#/map_err_ignore)). changelog: none
- Loading branch information