From 9da1eee436bdadfa3c80d309cd8bac385ef1d274 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Tue, 15 Dec 2020 14:39:26 +0800 Subject: Add regression test --- crates/hir_ty/src/tests/regression.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'crates/hir_ty') diff --git a/crates/hir_ty/src/tests/regression.rs b/crates/hir_ty/src/tests/regression.rs index da8170417..307a257b1 100644 --- a/crates/hir_ty/src/tests/regression.rs +++ b/crates/hir_ty/src/tests/regression.rs @@ -592,6 +592,30 @@ fn issue_4465_dollar_crate_at_type() { ); } +#[test] +fn issue_6811() { + check_infer( + r#" + macro_rules! profile_function { + () => { + let _a = 1; + let _b = 1; + }; + } + fn main() { + profile_function!(); + } + "#, + expect![[r#" + !3..5 '_a': i32 + !6..7 '1': i32 + !11..13 '_b': i32 + !14..15 '1': i32 + 103..131 '{ ...!(); }': () + "#]], + ); +} + #[test] fn issue_4053_diesel_where_clauses() { check_infer( -- cgit v1.2.3