Skip to content

Commit a8b0a3c

Browse files
authored
Rollup merge of rust-lang#75422 - poliorcetics:tidy-accept-more-safety-comments, r=Mark-Simulacrum
Accept more safety comments This accepts more `// SAFETY:` comments from `tidy`. This is done after the current behaviour of requiring text one the same line (because spaces are stripped so the last space never pass if there is no text on the same line) bit me once more in rust-lang#75066 This could potentially accept empty `// SAFETY:` comments but `tidy` is an internal tool used only here so my reasoning is reviews will catch those.
2 parents 7a90083 + 883dffa commit a8b0a3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/tidy/src/style.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ pub fn check(path: &Path, bad: &mut bool) {
263263
suppressible_tidy_err!(err, skip_undocumented_unsafe, "undocumented unsafe");
264264
}
265265
}
266-
if line.contains("// SAFETY: ") || line.contains("// Safety: ") {
266+
if line.contains("// SAFETY:") || line.contains("// Safety:") {
267267
last_safety_comment = true;
268268
} else if line.trim().starts_with("//") || line.trim().is_empty() {
269269
// keep previous value

0 commit comments

Comments
 (0)