Skip to content

Commit 9e3e3a4

Browse files
CentrilDavid Wood
and
David Wood
authored
with_desugared_doc: correctly refer to attr instead of self
Co-Authored-By: David Wood <[email protected]>
1 parent 0a5b38f commit 9e3e3a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustdoc/clean/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -859,8 +859,8 @@ impl Attributes {
859859
let mut cfg = Cfg::True;
860860
let mut doc_line = 0;
861861

862-
/// Converts `self` to a normal `#[doc="foo"]` comment, if it is a
863-
/// comment like `///` or `/** */`. (Returns `self` unchanged for
862+
/// Converts `attr` to a normal `#[doc="foo"]` comment, if it is a
863+
/// comment like `///` or `/** */`. (Returns `attr` unchanged for
864864
/// non-sugared doc attributes.)
865865
pub fn with_desugared_doc<T>(attr: &Attribute, f: impl FnOnce(&Attribute) -> T) -> T {
866866
if attr.is_sugared_doc {

0 commit comments

Comments
 (0)