Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/mir/lower/tests.rs')
| -rw-r--r-- | crates/hir-ty/src/mir/lower/tests.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/hir-ty/src/mir/lower/tests.rs b/crates/hir-ty/src/mir/lower/tests.rs index bf13b4c46e..d8f7d549d6 100644 --- a/crates/hir-ty/src/mir/lower/tests.rs +++ b/crates/hir-ty/src/mir/lower/tests.rs @@ -121,3 +121,16 @@ fn tuple_field() { "#, ); } + +#[test] +fn borrowck_alias_projection_recovery_does_not_panic() { + check_borrowck( + r#" +//- minicore: sized +trait Tr { type A; } +fn alias<T: Tr>(x: T::A) { + let (a, b) = x; +} + "#, + ); +} |