mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-26 22:53:28 +00:00
Rollup merge of #122430 - GuillaumeGomez:link-to-local, r=TaKO8Ki
Generate link to `Local` in `hir::Let` documentation This PR adds a missing link generation to `Local` type.
This commit is contained in:
commit
b84d1b8ec9
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user