From 883dffa4c9d7961520c8e152f4c2cd901e425bb7 Mon Sep 17 00:00:00 2001 From: Alexis Bourget Date: Tue, 11 Aug 2020 21:59:25 +0200 Subject: [PATCH] Accept more safety comments (notably those that are on multiple lines without text after SAFETY:) --- src/tools/tidy/src/style.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/tidy/src/style.rs b/src/tools/tidy/src/style.rs index 9c27a8a6f8876..bce3cf06b0751 100644 --- a/src/tools/tidy/src/style.rs +++ b/src/tools/tidy/src/style.rs @@ -263,7 +263,7 @@ pub fn check(path: &Path, bad: &mut bool) { suppressible_tidy_err!(err, skip_undocumented_unsafe, "undocumented unsafe"); } } - if line.contains("// SAFETY: ") || line.contains("// Safety: ") { + if line.contains("// SAFETY:") || line.contains("// Safety:") { last_safety_comment = true; } else if line.trim().starts_with("//") || line.trim().is_empty() { // keep previous value