Skip to content

Commit 6cf2d72

Browse files
committed
expand: Leave traces when expanding cfg_attr attributes
1 parent f357993 commit 6cf2d72

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

clippy_lints/src/attrs/duplicated_attributes.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ fn check_duplicated_attr(
3636
}
3737
let Some(ident) = attr.ident() else { return };
3838
let name = ident.name;
39-
if name == sym::doc || name == sym::cfg_attr || name == sym::rustc_on_unimplemented || name == sym::reason {
39+
if name == sym::doc
40+
|| name == sym::cfg_attr
41+
|| name == sym::cfg_attr_trace
42+
|| name == sym::rustc_on_unimplemented
43+
|| name == sym::reason {
4044
// FIXME: Would be nice to handle `cfg_attr` as well. Only problem is to check that cfg
4145
// conditions are the same.
4246
// `#[rustc_on_unimplemented]` contains duplicated subattributes, that's expected.

0 commit comments

Comments
 (0)