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 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/crates/hir-ty/src/tests/regression.rs b/crates/hir-ty/src/tests/regression.rs index 22404087bf..c5bf521d35 100644 --- a/crates/hir-ty/src/tests/regression.rs +++ b/crates/hir-ty/src/tests/regression.rs @@ -44,6 +44,26 @@ fn no_panic_on_field_of_enum() { } #[test] +fn anon_const_projection_in_impl_predicate() { + check_no_mismatches( + r#" +trait Trait { + type Assoc; +} + +struct S<const N: usize>; + +impl<const N: usize> S<N> +where + S<{ N }>: Trait, +{ + fn new(_: <S<N> as Trait>::Assoc) {} +} + "#, + ); +} + +#[test] fn bug_585() { check_infer( r#" |