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 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/crates/hir_ty/src/tests/regression.rs b/crates/hir_ty/src/tests/regression.rs index c3c934c468..ef27667ffa 100644 --- a/crates/hir_ty/src/tests/regression.rs +++ b/crates/hir_ty/src/tests/regression.rs @@ -1471,6 +1471,22 @@ fn regression_11688_3() { } #[test] +fn regression_11688_4() { + check_types( + r#" + trait Bar<const C: usize> { + fn baz(&self) -> [i32; C]; + } + + fn foo(x: &dyn Bar<2>) { + x.baz(); + //^^^^^^^ [i32; 2] + } + "#, + ) +} + +#[test] fn gat_crash_1() { cov_mark::check!(ignore_gats); check_no_mismatches( |