diff options
| author | Mukund Lakshman <yaymukund@gmail.com> | 2021-10-01 06:17:15 -0400 |
|---|---|---|
| committer | Mukund Lakshman <yaymukund@gmail.com> | 2021-10-04 05:01:04 -0400 |
| commit | a8a40ea9a4947a7b46421564517ee2aa4e3711f0 (patch) | |
| tree | b636e1f880c0f4aa70866dbc99e60621b2e80664 /src/tools | |
| parent | e737694a4d66b01308b73d4559a35b43e414faf9 (diff) | |
| download | rust-a8a40ea9a4947a7b46421564517ee2aa4e3711f0.tar.gz rust-a8a40ea9a4947a7b46421564517ee2aa4e3711f0.zip | |
librustdoc: Use correct heading levels.
- Avoid multiple <h1>s on a page. - The <h#> tags should follow a semantic hierarchy. - Cap at h6 (no h7)
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/error_index_generator/main.rs | 3 | ||||
| -rw-r--r-- | src/tools/tidy/src/error_codes_check.rs | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/tools/error_index_generator/main.rs b/src/tools/error_index_generator/main.rs index 01a3fc812b2..1ba283b1781 100644 --- a/src/tools/error_index_generator/main.rs +++ b/src/tools/error_index_generator/main.rs @@ -125,7 +125,8 @@ impl Formatter for HTMLFormatter { &mut id_map, ErrorCodes::Yes, DEFAULT_EDITION, - &Some(playground) + &Some(playground), + 0 ) .into_string() )? diff --git a/src/tools/tidy/src/error_codes_check.rs b/src/tools/tidy/src/error_codes_check.rs index 53c75a46339..ae169d383b2 100644 --- a/src/tools/tidy/src/error_codes_check.rs +++ b/src/tools/tidy/src/error_codes_check.rs @@ -49,7 +49,7 @@ fn check_error_code_explanation( } else if s.contains("compile-fail") { invalid_compile_fail_format = true; } - } else if s.starts_with("#### Note: this error code is no longer emitted by the compiler") { + } else if s.starts_with("### Note: this error code is no longer emitted by the compiler") { if !found_error_code { error_codes.get_mut(&err_code).map(|x| x.has_test = true); found_error_code = true; @@ -64,7 +64,7 @@ fn check_if_error_code_is_test_in_explanation(f: &str, err_code: &str) -> bool { for line in f.lines() { let s = line.trim(); - if s.starts_with("#### Note: this error code is no longer emitted by the compiler") { + if s.starts_with("### Note: this error code is no longer emitted by the compiler") { return true; } if s.starts_with("```") { |
