Sign in
rust
/
rust-lang
/
rust
/
refs/heads/lcnr/rustc-dev-guide
/
.
/
tests
/
ui
/
proc-macro
/
auxiliary
/
derive-attr-cfg.rs
blob: cb60c182a43c26741a98e1386aeb43a2fdc1d354 [
file
] [
log
] [
blame
]
extern
crate proc_macro
;
use
proc_macro
::
TokenStream
;
#[
proc_macro_derive
(
Foo
,
attributes
(
foo
))]
pub
fn
derive
(
input
:
TokenStream
)
->
TokenStream
{
assert
!(!
input
.
to_string
().
contains
(
"#[cfg(any())]"
));
""
.
parse
().
unwrap
()
}