We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb7699d commit 8feb2c6Copy full SHA for 8feb2c6
clippy_lints/src/attrs.rs
@@ -527,7 +527,8 @@ impl EarlyLintPass for CfgAttrPass {
527
if feature_item.check_name("rustfmt");
528
// check for `rustfmt_skip` and `rustfmt::skip`
529
if let Some(skip_item) = &items[1].meta_item();
530
- if skip_item.check_name("rustfmt_skip") || skip_item.check_name("skip");
+ if skip_item.check_name("rustfmt_skip") ||
531
+ skip_item.path.segments.last().expect("empty path in attribute").ident.name == "skip";
532
// Only lint outer attributes, because custom inner attributes are unstable
533
// Tracking issue: https://github.com/rust-lang/rust/issues/54726
534
if let AttrStyle::Outer = attr.style;
0 commit comments