Skip to main content

Module unescaped_backticks

Module unescaped_backticks 

Source
Expand description

Detects unescaped backticks (`) in doc comments.

Re-exportsΒ§

use std::ops::Range; πŸ”’
use rustc_errors::Diag; πŸ”’
use rustc_hir::HirId; πŸ”’
use rustc_lint::Applicability; πŸ”’
use rustc_resolve::rustdoc::pulldown_cmark::Event; πŸ”’
use rustc_resolve::rustdoc::pulldown_cmark::Parser; πŸ”’
use rustc_resolve::rustdoc::source_span_for_markdown_range; πŸ”’
use crate::clean::Item; πŸ”’
use crate::core::DocContext; πŸ”’
use crate::html::markdown::main_body_opts; πŸ”’

StructsΒ§

Element πŸ”’
A markdown tagged element, which may or may not contain an unescaped backtick.

EnumsΒ§

PrevCodeGuess πŸ”’
A previous inline code node, that looks wrong.

FunctionsΒ§

can_suggest_backtick πŸ”’
Returns whether inserting a backtick at dox[index] will not produce double backticks.
clamp_end πŸ”’
Decrease the index until it is inside or one past the end of one of the ranges.
clamp_start πŸ”’
Increase the index until it is inside or one past the end of one of the ranges.
guess_end_of_code πŸ”’
Given a potentially unclosed inline code, attempt to find the end.
guess_start_of_code πŸ”’
Given a potentially unclosed inline code, attempt to find the start.
suggest_insertion πŸ”’
Try to emit a span suggestion and fall back to help messages if we can’t find a suitable span.
visit_item πŸ”’