From 9e3e3a470e4e04ff72148e94ead8d50272842da1 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Fri, 25 Oct 2019 10:43:08 +0200 Subject: [PATCH] with_desugared_doc: correctly refer to `attr` instead of `self` Co-Authored-By: David Wood --- src/librustdoc/clean/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index d8216fbf79659..a642491b28181 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -859,8 +859,8 @@ impl Attributes { let mut cfg = Cfg::True; let mut doc_line = 0; - /// Converts `self` to a normal `#[doc="foo"]` comment, if it is a - /// comment like `///` or `/** */`. (Returns `self` unchanged for + /// Converts `attr` to a normal `#[doc="foo"]` comment, if it is a + /// comment like `///` or `/** */`. (Returns `attr` unchanged for /// non-sugared doc attributes.) pub fn with_desugared_doc(attr: &Attribute, f: impl FnOnce(&Attribute) -> T) -> T { if attr.is_sugared_doc {