Skip to content

Commit d919b04

Browse files
Generate link to Local in hir::Let documentation
1 parent cdb775c commit d919b04

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/rustc_hir/src/hir.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1253,11 +1253,11 @@ pub struct Arm<'hir> {
12531253
pub body: &'hir Expr<'hir>,
12541254
}
12551255

1256-
/// Represents a `let <pat>[: <ty>] = <expr>` expression (not a Local), occurring in an `if-let` or
1257-
/// `let-else`, evaluating to a boolean. Typically the pattern is refutable.
1256+
/// Represents a `let <pat>[: <ty>] = <expr>` expression (not a [`Local`]), occurring in an `if-let`
1257+
/// or `let-else`, evaluating to a boolean. Typically the pattern is refutable.
12581258
///
1259-
/// In an if-let, imagine it as `if (let <pat> = <expr>) { ... }`; in a let-else, it is part of the
1260-
/// desugaring to if-let. Only let-else supports the type annotation at present.
1259+
/// In an `if let`, imagine it as `if (let <pat> = <expr>) { ... }`; in a let-else, it is part of
1260+
/// the desugaring to if-let. Only let-else supports the type annotation at present.
12611261
#[derive(Debug, Clone, Copy, HashStable_Generic)]
12621262
pub struct Let<'hir> {
12631263
pub span: Span,

0 commit comments

Comments
 (0)