diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2025-03-14 20:34:43 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2025-03-17 15:58:25 +0300 |
| commit | 6cf2d721508ab8879be65bbfc5ca74ed64c87d05 (patch) | |
| tree | 877f38f6a9cb1d5252574f8962a314c4abc2af02 | |
| parent | f3579934b1a66da5b21cd26bccd578982c773c75 (diff) | |
| download | rust-6cf2d721508ab8879be65bbfc5ca74ed64c87d05.tar.gz rust-6cf2d721508ab8879be65bbfc5ca74ed64c87d05.zip | |
expand: Leave traces when expanding `cfg_attr` attributes
| -rw-r--r-- | clippy_lints/src/attrs/duplicated_attributes.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clippy_lints/src/attrs/duplicated_attributes.rs b/clippy_lints/src/attrs/duplicated_attributes.rs index 2ddbc7a6a76..5c486eb90cc 100644 --- a/clippy_lints/src/attrs/duplicated_attributes.rs +++ b/clippy_lints/src/attrs/duplicated_attributes.rs @@ -36,7 +36,11 @@ 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 || name == sym::reason { + if name == sym::doc + || name == sym::cfg_attr + || name == sym::cfg_attr_trace + || 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. |
