Add regression test

This commit is contained in:
Giacomo Stevanato 2021-09-21 15:03:34 +02:00
parent 0d49da5e18
commit 7f76a73a38

View file

@ -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(());
}
"#,
)
}