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