Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/consteval/tests.rs')
| -rw-r--r-- | crates/hir-ty/src/consteval/tests.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/hir-ty/src/consteval/tests.rs b/crates/hir-ty/src/consteval/tests.rs index 5421b97db2..0e51594a78 100644 --- a/crates/hir-ty/src/consteval/tests.rs +++ b/crates/hir-ty/src/consteval/tests.rs @@ -2634,6 +2634,19 @@ fn const_generic_subst_fn() { } #[test] +fn const_generic_fixed_width() { + check_number( + r#" + const fn m<const N: u64>() -> u64 { + N + } + const GOAL: u64 = m::<0>(); + "#, + 0, + ); +} + +#[test] fn layout_of_type_with_associated_type_field_defined_inside_body() { check_number( r#" |