Function rustdoc::passes::source_span_for_markdown_range
source · [−]pub(crate) fn source_span_for_markdown_range(
tcx: TyCtxt<'_>,
markdown: &str,
md_range: &Range<usize>,
attrs: &Attributes
) -> Option<Span>
Expand description
Attempts to match a range of bytes from parsed markdown to a Span
in the source code.
This method will return None
if we cannot construct a span from the source map or if the
attributes are not all sugared doc comments. It’s difficult to calculate the correct span in
that case due to escaping and other source features.