correct wrong doc syntax

This commit is contained in:
lucarlig 2024-02-25 22:52:44 +04:00
parent d84d9d32f1
commit ee50d5df90
4 changed files with 6 additions and 6 deletions

View file

@ -74,7 +74,7 @@ enum CharRange {
LowerChar, LowerChar,
/// 'A'..='Z' | b'A'..=b'Z' /// 'A'..='Z' | b'A'..=b'Z'
UpperChar, UpperChar,
/// AsciiLower | AsciiUpper /// `AsciiLower` | `AsciiUpper`
FullChar, FullChar,
/// '0..=9' /// '0..=9'
Digit, Digit,

View file

@ -75,7 +75,7 @@ enum OffendingFilterExpr<'tcx> {
}, },
/// `.filter(|enum| matches!(enum, Enum::A(_)))` /// `.filter(|enum| matches!(enum, Enum::A(_)))`
Matches { Matches {
/// The DefId of the variant being matched /// The `DefId` of the variant being matched
variant_def_id: hir::def_id::DefId, variant_def_id: hir::def_id::DefId,
}, },
} }

View file

@ -74,12 +74,12 @@ impl QuestionMark {
enum IfBlockType<'hir> { enum IfBlockType<'hir> {
/// An `if x.is_xxx() { a } else { b } ` expression. /// An `if x.is_xxx() { a } else { b } ` expression.
/// ///
/// Contains: caller (x), caller_type, call_sym (is_xxx), if_then (a), if_else (b) /// Contains: `caller (x), caller_type, call_sym (is_xxx), if_then (a), if_else (b)`
IfIs(&'hir Expr<'hir>, Ty<'hir>, Symbol, &'hir Expr<'hir>), IfIs(&'hir Expr<'hir>, Ty<'hir>, Symbol, &'hir Expr<'hir>),
/// An `if let Xxx(a) = b { c } else { d }` expression. /// An `if let Xxx(a) = b { c } else { d }` expression.
/// ///
/// Contains: let_pat_qpath (Xxx), let_pat_type, let_pat_sym (a), let_expr (b), if_then (c), /// Contains: `let_pat_qpath (Xxx), let_pat_type, let_pat_sym (a), let_expr (b), if_then (c),
/// if_else (d) /// if_else (d)`
IfLet( IfLet(
Res, Res,
Ty<'hir>, Ty<'hir>,

View file

@ -62,7 +62,7 @@ declare_lint_pass!(SlowVectorInit => [SLOW_VECTOR_INITIALIZATION]);
/// assigned to a variable. For example, `let mut vec = Vec::with_capacity(0)` or /// assigned to a variable. For example, `let mut vec = Vec::with_capacity(0)` or
/// `vec = Vec::with_capacity(0)` /// `vec = Vec::with_capacity(0)`
struct VecAllocation<'tcx> { struct VecAllocation<'tcx> {
/// HirId of the variable /// `HirId` of the variable
local_id: HirId, local_id: HirId,
/// Reference to the expression which allocates the vector /// Reference to the expression which allocates the vector