Skip to content

Commit 7f76a73

Browse files
committed
Add regression test
1 parent 0d49da5 commit 7f76a73

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

crates/hir_ty/src/tests/regression.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,3 +1177,24 @@ fn multiexp_inner() {
11771177
"#,
11781178
);
11791179
}
1180+
1181+
#[test]
1182+
fn macro_expands_to_impl_trait() {
1183+
check_no_mismatches(
1184+
r#"
1185+
trait Foo {}
1186+
1187+
macro_rules! ty {
1188+
() => {
1189+
impl Foo
1190+
}
1191+
}
1192+
1193+
fn foo(_: ty!()) {}
1194+
1195+
fn bar() {
1196+
foo(());
1197+
}
1198+
"#,
1199+
)
1200+
}

0 commit comments

Comments
 (0)