diff options
author | Lukas Wirth <[email protected]> | 2021-01-01 09:06:42 +0000 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-01-01 09:06:42 +0000 |
commit | 0acdb730769cfb040ffc5e2c87f83b19fd3ce291 (patch) | |
tree | 5e416c64e2bf0cfb8dee2c212ae9f301dd974416 /crates/hir_ty/src/tests | |
parent | 77ad203a719be074e81485af7a4fb02fac6cbf61 (diff) |
Add ConstParams to the HIR
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 | } | ||