Handle 'implementation safety' headers as well

This commit is contained in:
Manish Goregaokar 2021-10-21 08:50:50 -07:00
parent 91496c2ac6
commit 1e8d9fb18c
2 changed files with 7 additions and 0 deletions

View file

@ -579,6 +579,8 @@ fn check_doc<'a, Events: Iterator<Item = (pulldown_cmark::Event<'a>, Range<usize
continue;
}
headers.safety |= in_heading && text.trim() == "Safety";
headers.safety |= in_heading && text.trim() == "Implementation safety";
headers.safety |= in_heading && text.trim() == "Implementation Safety";
headers.errors |= in_heading && text.trim() == "Errors";
headers.panics |= in_heading && text.trim() == "Panics";
if in_code {

View file

@ -125,3 +125,8 @@ pub mod __macro {
pub unsafe fn f() {}
}
}
/// # Implementation safety
pub unsafe trait DocumentedUnsafeTraitWithImplementationHeader {
fn method();
}