2019-07-27 00:54:25 +03:00
|
|
|
//@ run-pass
|
2024-11-24 17:37:25 -08:00
|
|
|
//@ proc-macro: modify-ast.rs
|
2025-09-26 13:59:06 +02:00
|
|
|
//@ ignore-backends: gcc
|
2018-04-10 12:52:47 -07:00
|
|
|
|
|
|
|
|
extern crate modify_ast;
|
|
|
|
|
|
|
|
|
|
use modify_ast::*;
|
|
|
|
|
|
|
|
|
|
#[derive(Foo)]
|
|
|
|
|
pub struct MyStructc {
|
2024-04-07 00:43:00 +02:00
|
|
|
#[cfg_attr(FALSE, foo)]
|
2018-04-10 12:52:47 -07:00
|
|
|
_a: i32,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
macro_rules! a {
|
|
|
|
|
($i:item) => ($i)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
a! {
|
|
|
|
|
#[assert1]
|
|
|
|
|
pub fn foo() {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
let _a = MyStructc { _a: 0 };
|
|
|
|
|
foo();
|
|
|
|
|
}
|