diff --git a/crates/hir_ty/src/tests/regression.rs b/crates/hir_ty/src/tests/regression.rs index 618499fdc1..2f38d584a1 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(()); +} + "#, + ) +}