Accept more safety comments (notably those that are on multiple lines without text after SAFETY:)

This commit is contained in:
Alexis Bourget 2020-08-11 21:59:25 +02:00
parent cbe7c5ce70
commit 883dffa4c9

View File

@ -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