Skip to content

Commit 6b33043

Browse files
committed
Add a test for rust-lang#3060
1 parent 8b709c0 commit 6b33043

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

tests/source/type.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,12 @@ impl Future<Item = (), Error = SomeError> + 'a,
8282
'a + 'b +
8383
'c {
8484
}
85+
86+
// #3060
87+
macro_rules! foo {
88+
($foo_api: ty) => {
89+
type Target = ( $foo_api ) + 'static;
90+
}
91+
}
92+
93+
type Target = ( FooAPI ) + 'static;

tests/target/type.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,12 @@ pub fn do_something<'a, T: Trait1 + Trait2 + 'a>(
8181
Error = SomeError,
8282
> + 'a + 'b + 'c {
8383
}
84+
85+
// #3060
86+
macro_rules! foo {
87+
($foo_api: ty) => {
88+
type Target = ($foo_api) + 'static;
89+
};
90+
}
91+
92+
type Target = (FooAPI) + 'static;

0 commit comments

Comments
 (0)