diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-03-13 11:24:51 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-03-13 11:24:51 +0100 |
| commit | d919b04e59b0e357b509cb9c0127dce45f532996 (patch) | |
| tree | c00e8145d5f457a46e8d1f29ecd56aeb7742e50a | |
| parent | cdb775cab50311de54ccf3a07b331cc56b0da436 (diff) | |
| download | rust-d919b04e59b0e357b509cb9c0127dce45f532996.tar.gz rust-d919b04e59b0e357b509cb9c0127dce45f532996.zip | |
Generate link to `Local` in `hir::Let` documentation
| -rw-r--r-- | compiler/rustc_hir/src/hir.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs index 7d5b4c0f06d..fd069eb09e2 100644 --- a/compiler/rustc_hir/src/hir.rs +++ b/compiler/rustc_hir/src/hir.rs @@ -1253,11 +1253,11 @@ pub struct Arm<'hir> { pub body: &'hir Expr<'hir>, } -/// Represents a `let <pat>[: <ty>] = <expr>` expression (not a Local), occurring in an `if-let` or -/// `let-else`, evaluating to a boolean. Typically the pattern is refutable. +/// Represents a `let <pat>[: <ty>] = <expr>` expression (not a [`Local`]), occurring in an `if-let` +/// or `let-else`, evaluating to a boolean. Typically the pattern is refutable. /// -/// In an if-let, imagine it as `if (let <pat> = <expr>) { ... }`; in a let-else, it is part of the -/// desugaring to if-let. Only let-else supports the type annotation at present. +/// In an `if let`, imagine it as `if (let <pat> = <expr>) { ... }`; in a let-else, it is part of +/// the desugaring to if-let. Only let-else supports the type annotation at present. #[derive(Debug, Clone, Copy, HashStable_Generic)] pub struct Let<'hir> { pub span: Span, |
