From cadb367a5cb36590c54d90c4cad5ebf67e796477 Mon Sep 17 00:00:00 2001 From: flip1995 Date: Thu, 1 Nov 2018 20:06:59 +0100 Subject: [PATCH] Also lint cfg_attr(.., rustfmt::skip) --- clippy_lints/src/attrs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/attrs.rs b/clippy_lints/src/attrs.rs index 24edf6d8495..593484aa1c6 100644 --- a/clippy_lints/src/attrs.rs +++ b/clippy_lints/src/attrs.rs @@ -517,9 +517,9 @@ impl EarlyLintPass for CfgAttrPass { // check for `rustfmt` if let Some(feature_item) = items[0].meta_item(); if feature_item.name() == "rustfmt"; - // check for `rustfmt_skip` + // check for `rustfmt_skip` and `rustfmt::skip` if let Some(skip_item) = &items[1].meta_item(); - if skip_item.name() == "rustfmt_skip"; + if skip_item.name() == "rustfmt_skip" || skip_item.name() == "skip"; then { let attr_style = match attr.style { AttrStyle::Outer => "#[",