diff options
Diffstat (limited to 'crates/hir_ty/src/tests')
-rw-r--r-- | crates/hir_ty/src/tests/simple.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/hir_ty/src/tests/simple.rs b/crates/hir_ty/src/tests/simple.rs index a61282d5a..bd6beea99 100644 --- a/crates/hir_ty/src/tests/simple.rs +++ b/crates/hir_ty/src/tests/simple.rs | |||
@@ -2375,3 +2375,20 @@ fn infer_operator_overload() { | |||
2375 | "#]], | 2375 | "#]], |
2376 | ); | 2376 | ); |
2377 | } | 2377 | } |
2378 | |||
2379 | |||
2380 | #[test] | ||
2381 | fn infer_const_params() { | ||
2382 | check_infer( | ||
2383 | r#" | ||
2384 | fn foo<const FOO: usize>() { | ||
2385 | let bar = FOO; | ||
2386 | } | ||
2387 | "#, | ||
2388 | expect![[r#" | ||
2389 | 27..49 '{ ...FOO; }': () | ||
2390 | 37..40 'bar': usize | ||
2391 | 43..46 'FOO': usize | ||
2392 | "#]], | ||
2393 | ); | ||
2394 | } | ||