]> git.lizzy.rs Git - rust.git/blobdiff - crates/hir_ty/src/tests/simple.rs
Add ConstParams to the HIR
[rust.git] / crates / hir_ty / src / tests / simple.rs
index a61282d5a744222e63a27e374768d50490f0d69a..bd6beea99440ee2a92f1ecd45bd41274fb1b2563 100644 (file)
@@ -2375,3 +2375,20 @@ fn test() {
         "#]],
     );
 }
+
+
+#[test]
+fn infer_const_params() {
+    check_infer(
+        r#"
+        fn foo<const FOO: usize>() {
+            let bar = FOO;
+        }
+        "#,
+        expect![[r#"
+            27..49 '{     ...FOO; }': ()
+            37..40 'bar': usize
+            43..46 'FOO': usize
+        "#]],
+    );
+}