diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2021-09-20 08:46:26 -0400 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2021-09-20 22:21:43 -0400 |
| commit | 3b896796719ed1e151d507b4bf2ea635a89cda9e (patch) | |
| tree | 22ddc6d0afcf6818d1603cc1aeff310b19f49dfa /src | |
| parent | f33890082603434eb640dfd256819b0d722e911d (diff) | |
| download | rust-3b896796719ed1e151d507b4bf2ea635a89cda9e.tar.gz rust-3b896796719ed1e151d507b4bf2ea635a89cda9e.zip | |
Adjust documentation for compatibility with 2021
This also adjusts the lint docs generation to accept (and ignore) an allow attribute, rather than expecting the documentation to be immediately followed by the lint name.
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/lint-docs/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/lint-docs/src/lib.rs b/src/tools/lint-docs/src/lib.rs index e5c7f125712..fdc89a184da 100644 --- a/src/tools/lint-docs/src/lib.rs +++ b/src/tools/lint-docs/src/lib.rs @@ -149,6 +149,10 @@ impl<'a> LintExtractor<'a> { } else if line.starts_with("// ") { // Ignore comments. continue; + } else if line.starts_with("#[allow") { + // Ignore allow of lints (useful for + // invalid_rust_codeblocks). + continue; } else { let name = lint_name(line).map_err(|e| { format!( |
