]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/modify-ast.rs
Rollup merge of #107532 - compiler-errors:erase-regions-in-uninhabited, r=jackh726
[rust.git] / tests / ui / proc-macro / modify-ast.rs
1 // run-pass
2 // aux-build:modify-ast.rs
3
4 extern crate modify_ast;
5
6 use modify_ast::*;
7
8 #[derive(Foo)]
9 pub struct MyStructc {
10     #[cfg_attr(my_cfg, foo)]
11     _a: i32,
12 }
13
14 macro_rules! a {
15     ($i:item) => ($i)
16 }
17
18 a! {
19     #[assert1]
20     pub fn foo() {}
21 }
22
23 fn main() {
24     let _a = MyStructc { _a: 0 };
25     foo();
26 }