Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/lib.rs')
| -rw-r--r-- | crates/hir-ty/src/lib.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/crates/hir-ty/src/lib.rs b/crates/hir-ty/src/lib.rs index acac7ddcad..55d81875a2 100644 --- a/crates/hir-ty/src/lib.rs +++ b/crates/hir-ty/src/lib.rs @@ -1052,18 +1052,17 @@ pub fn known_const_to_ast( #[derive(Debug, Copy, Clone)] pub(crate) enum DeclOrigin { - // from an `if let` expression LetExpr, - // from `let x = ..` - LocalDecl, + /// from `let x = ..` + LocalDecl { + has_else: bool, + }, } /// Provides context for checking patterns in declarations. More specifically this /// allows us to infer array types if the pattern is irrefutable and allows us to infer -/// the size of the array. See issue #76342. +/// the size of the array. See issue rust-lang/rust#76342. #[derive(Debug, Copy, Clone)] pub(crate) struct DeclContext { - // whether we're in a let-else context - pub(crate) has_else: bool, pub(crate) origin: DeclOrigin, } |