File: custom_derive.rs

package info (click to toggle)
rust-macro-rules-attribute 0.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 160 kB
  • sloc: sh: 20; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 302 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#[macro_use]
extern crate macro_rules_attribute;

derive_alias! {
    #[derive(Nothing!)] = #[derive()];
}

#[derive(Nothing!)]
#[custom(hello)]
struct Foo {
    #[derive_args("test")]
    x: i32,
}

#[macro_rules_derive(Nothing)]
#[custom(hello)]
struct Bar {
    #[derive_args("test")]
    x: i32,
}