From ca62d98781f13b6fb82c4d19269ee255208fb3d4 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Sat, 11 Jan 2020 00:29:00 +0800 Subject: Expand PAREN_EXPR as expression --- crates/ra_hir_ty/src/tests/regression.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'crates/ra_hir_ty') diff --git a/crates/ra_hir_ty/src/tests/regression.rs b/crates/ra_hir_ty/src/tests/regression.rs index 13c5f62e4..6c5d39549 100644 --- a/crates/ra_hir_ty/src/tests/regression.rs +++ b/crates/ra_hir_ty/src/tests/regression.rs @@ -309,6 +309,23 @@ fn test(query_response: Canonical>) { ); } +#[test] +fn infer_paren_macro_call() { + assert_snapshot!( + infer(r#" +macro_rules! bar { () => {0u32} } +fn test() { + let a = (bar!()); +} +"#), + @r###" + ![0; 4) '0u32': u32 + [45; 70) '{ ...()); }': () + [55; 56) 'a': u32 + "### + ); +} + #[test] fn bug_1030() { assert_snapshot!(infer(r#" -- cgit v1.2.3