Module rustc_resolve::rustdoc

source ·

Structs§

  • A portion of documentation, extracted from a #[doc] attribute.

Enums§

Functions§

  • The goal of this function is to apply the DocFragment transformation that is required when transforming into the final Markdown, which is applying the computed indent to each line in each doc fragment (a DocFragment can contain multiple lines in case of #[doc = ""]).
  • Simplified version of preprocessed_markdown_links from rustdoc. Must return at least the same links as it, but may add some more links on top of that.
  • Collects additional data of link.
  • Has #[rustc_doc_primitive] or #[doc(keyword)].
  • Returns whether the first doc-comment is an inner attribute.
  • Options for rendering Markdown in the main body of documentation.
  • Keep inline and reference links [], but skip autolinks <> which we never consider to be intra-doc links.
  • Similiar version of markdown_links from rustdoc. This will collect destination links and display text if exists.
  • Return the doc-comments on this item, grouped by the module they came from. The module can be different if this is a re-export with added documentation.
  • Simplified version of the corresponding function in rustdoc. If the rustdoc version returns a successful result, this function must return the same result. Otherwise this function may return anything.
  • Attempts to match a range of bytes from parsed markdown to a Span in the source code.
  • Returns a span encompassing all the document fragments.
  • Removes excess indentation on comments in order for the Markdown to be parsed correctly. This is necessary because the convention for writing documentation is to provide a space between the /// or //! marker and the doc text, but Markdown is whitespace-sensitive. For example, a block of text with four-space indentation is parsed as a code block, so if we didn’t unindent comments, these list items