From 0acdb730769cfb040ffc5e2c87f83b19fd3ce291 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 1 Jan 2021 10:06:42 +0100 Subject: Add ConstParams to the HIR --- crates/hir_ty/src/tests/simple.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'crates/hir_ty/src/tests') 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() { "#]], ); } + + +#[test] +fn infer_const_params() { + check_infer( + r#" + fn foo() { + let bar = FOO; + } + "#, + expect![[r#" + 27..49 '{ ...FOO; }': () + 37..40 'bar': usize + 43..46 'FOO': usize + "#]], + ); +} -- cgit v1.2.3