2019-07-27 00:54:25 +03:00
|
|
|
// run-pass
|
2016-11-22 00:02:58 +10:30
|
|
|
// no-prefer-dynamic
|
2016-11-18 02:11:20 +10:30
|
|
|
// compile-flags: --test
|
|
|
|
|
|
|
|
#![crate_type = "proc-macro"]
|
|
|
|
|
|
|
|
extern crate proc_macro;
|
|
|
|
|
2016-11-22 00:02:58 +10:30
|
|
|
use proc_macro::TokenStream;
|
|
|
|
|
2017-01-19 09:31:55 +11:00
|
|
|
// ```
|
|
|
|
// assert!(true);
|
|
|
|
// ```
|
2016-11-22 00:02:58 +10:30
|
|
|
#[proc_macro_derive(Foo)]
|
|
|
|
pub fn derive_foo(_input: TokenStream) -> TokenStream {
|
2016-11-18 02:11:20 +10:30
|
|
|
"".parse().unwrap()
|
|
|
|
}
|
2016-11-22 00:02:58 +10:30
|
|
|
|
|
|
|
#[test]
|
|
|
|
pub fn test_derive() {
|
|
|
|
assert!(true);
|
|
|
|
}
|