Skip to content

Commit 1ad705f

Browse files
committed
Add test for derive helper compat collisions
1 parent e22dab3 commit 1ad705f

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
extern crate proc_macro;
2+
use proc_macro::{TokenStream, TokenTree};
3+
4+
#[proc_macro_derive(Empty2, attributes(empty_helper))]
5+
pub fn empty_derive2(_: TokenStream) -> TokenStream {
6+
TokenStream::new()
7+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//@ proc-macro: test-macros.rs
2+
//@ proc-macro: extra-empty-derive.rs
3+
//@ build-pass
4+
5+
#[macro_use(Empty)]
6+
extern crate test_macros;
7+
#[macro_use(Empty2)]
8+
extern crate extra_empty_derive;
9+
10+
#[derive(Empty)]
11+
#[empty_helper]
12+
#[derive(Empty2)]
13+
struct S;
14+
15+
fn main() {}

0 commit comments

Comments
 (0)