Auto merge of #13386 - alex-semenyuk:no_lint_on_duplicate_reason, r=xFrednet

Not trigger `duplicated_attributes` on duplicate reasons

As at #13355 we shoudn't  trigger `duplicated_attributes` on duplicate reasons attr
changelog: [`duplicated_attributes`]: not trigger `duplicated_attributes` on duplicate reasons
This commit is contained in:
bors 2024-09-12 10:26:14 +00:00
commit e039e72d85
2 changed files with 5 additions and 1 deletions

View file

@ -36,7 +36,7 @@ fn check_duplicated_attr(
}
let Some(ident) = attr.ident() else { return };
let name = ident.name;
if name == sym::doc || name == sym::cfg_attr || name == sym::rustc_on_unimplemented {
if name == sym::doc || name == sym::cfg_attr || name == sym::rustc_on_unimplemented || name == sym::reason {
// FIXME: Would be nice to handle `cfg_attr` as well. Only problem is to check that cfg
// conditions are the same.
// `#[rustc_on_unimplemented]` contains duplicated subattributes, that's expected.