Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/tests/regression.rs')
| -rw-r--r-- | crates/hir-ty/src/tests/regression.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/hir-ty/src/tests/regression.rs b/crates/hir-ty/src/tests/regression.rs index 16ba3dd6e3..a155adcec6 100644 --- a/crates/hir-ty/src/tests/regression.rs +++ b/crates/hir-ty/src/tests/regression.rs @@ -1694,3 +1694,16 @@ fn foo(a: &dyn DoesNotExist) { "#, ); } + +#[test] +fn self_assoc_with_const_generics_crash() { + check_no_mismatches( + r#" +trait Trait { type Item; } +impl<T, const N: usize> Trait for [T; N] { + type Item = (); + fn f<U>(_: Self::Item) {} +} + "#, + ); +} |