mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 15:11:30 +00:00
Handle 'implementation safety' headers as well
This commit is contained in:
parent
91496c2ac6
commit
1e8d9fb18c
2 changed files with 7 additions and 0 deletions
|
@ -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 {
|
||||
|
|
|
@ -125,3 +125,8 @@ pub mod __macro {
|
|||
pub unsafe fn f() {}
|
||||
}
|
||||
}
|
||||
|
||||
/// # Implementation safety
|
||||
pub unsafe trait DocumentedUnsafeTraitWithImplementationHeader {
|
||||
fn method();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue