diff options
Diffstat (limited to 'src/tools/rust-analyzer/crates/hir-ty/src/layout/tests/closure.rs')
-rw-r--r-- | src/tools/rust-analyzer/crates/hir-ty/src/layout/tests/closure.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/layout/tests/closure.rs b/src/tools/rust-analyzer/crates/hir-ty/src/layout/tests/closure.rs index 576e7f3fc..bbe855a14 100644 --- a/src/tools/rust-analyzer/crates/hir-ty/src/layout/tests/closure.rs +++ b/src/tools/rust-analyzer/crates/hir-ty/src/layout/tests/closure.rs @@ -255,3 +255,17 @@ fn ellipsis_pattern() { } } } + +#[test] +fn regression_15623() { + size_and_align_expr! { + let a = 2; + let b = 3; + let c = 5; + move || { + let 0 = a else { return b; }; + let y = c; + y + } + } +} |