about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--crates/hir_ty/src/tests/regression.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/crates/hir_ty/src/tests/regression.rs b/crates/hir_ty/src/tests/regression.rs
index 618499fdc19..2f38d584a12 100644
--- a/crates/hir_ty/src/tests/regression.rs
+++ b/crates/hir_ty/src/tests/regression.rs
@@ -1177,3 +1177,24 @@ fn multiexp_inner() {
         "#,
     );
 }
+
+#[test]
+fn macro_expands_to_impl_trait() {
+    check_no_mismatches(
+        r#"
+trait Foo {}
+
+macro_rules! ty {
+    () => {
+        impl Foo
+    }
+}
+
+fn foo(_: ty!()) {}
+
+fn bar() {
+    foo(());
+}
+    "#,
+    )
+}