From 9ce6fb34ca249388def66d183a844d3dabaefc94 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Fri, 4 May 2018 12:59:45 +0200 Subject: [PATCH] Satisfy dogfood --- clippy_lints/src/doc.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/clippy_lints/src/doc.rs b/clippy_lints/src/doc.rs index 840dd4b045f4..7d3e812c9c59 100644 --- a/clippy_lints/src/doc.rs +++ b/clippy_lints/src/doc.rs @@ -150,11 +150,9 @@ pub fn check_attrs<'a>(cx: &EarlyContext, valid_idents: &[String], attrs: &'a [a spans.extend_from_slice(¤t_spans); doc.push_str(¤t); } - } else { + } else if attr.name() == "doc" { // ignore mix of sugared and non-sugared doc - if attr.name() == "doc" { - return; - } + return; } }