mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 23:20:39 +00:00
Fix case where doc_markdown
is triggered on words ending with "ified"
This commit is contained in:
parent
345c94c98f
commit
760c3fab4f
1 changed files with 4 additions and 0 deletions
|
@ -92,6 +92,10 @@ fn check_word(cx: &LateContext<'_>, word: &str, span: Span, code_level: isize, b
|
||||||
&& matches!(prefix.chars().last(), Some('S' | 'X'))
|
&& matches!(prefix.chars().last(), Some('S' | 'X'))
|
||||||
{
|
{
|
||||||
prefix
|
prefix
|
||||||
|
} else if let Some(prefix) = s.strip_suffix("ified")
|
||||||
|
&& prefix.chars().all(|c| c.is_ascii_uppercase())
|
||||||
|
{
|
||||||
|
prefix
|
||||||
} else {
|
} else {
|
||||||
s.strip_suffix('s').unwrap_or(s)
|
s.strip_suffix('s').unwrap_or(s)
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue