1 // { dg-additional-options "-frust-crate-type=proc-macro" }
7 #[proc_macro_attribute] // { dg-error "the .#.proc_macro_attribute.. attribute may only be used on bare functions" }
8 type AliasedType = inner::InnerStruct;
10 // { dg-error "the .#.proc_macro_attribute.. attribute may only be used on bare functions" "" { target *-*-* } .+1 }
11 #[proc_macro_attribute]
12 use inner::InnerStruct;
14 #[proc_macro_attribute] // { dg-error "the .#.proc_macro_attribute.. attribute may only be used on bare functions" }
17 #[proc_macro_attribute] // { dg-error "the .#.proc_macro_attribute.. attribute may only be used on bare functions" }
18 struct MyCurlyStruct {
22 #[proc_macro_attribute] // { dg-error "the .#.proc_macro_attribute.. attribute may only be used on bare functions" }
23 struct MyTupleStruct(usize);
25 #[proc_macro_attribute]
26 // { dg-error "the .#.proc_macro_attribute.. attribute may only be used on bare functions" "" { target *-*-* } .-1 }
27 extern crate my_extern_crate; // { dg-error "unknown crate .my_extern_crate." }
28 // { dg-error "failed to locate crate .my_extern_crate." "" { target *-*-* } .-1 }
30 #[proc_macro_attribute] // { dg-error "the .#.proc_macro_attribute.. attribute may only be used on bare functions" }
33 #[proc_macro_attribute] // { dg-error "the .#.proc_macro_attribute.. attribute may only be used on bare functions" }
36 #[proc_macro_attribute] // { dg-error "the .#.proc_macro_attribute.. attribute may only be used on bare functions" }
42 #[proc_macro_attribute] // { dg-error "the .#.proc_macro_attribute.. attribute may only be used on bare functions" }
43 const MY_CONST_STR: &str = "my_string";
45 #[proc_macro_attribute] // { dg-error "the .#.proc_macro_attribute.. attribute may only be used on bare functions" }
46 static MY_STATIC_USIZE: usize = 10;
48 #[proc_macro_attribute] // { dg-error "the .#.proc_macro_attribute.. attribute may only be used on bare functions" }
51 #[proc_macro_attribute] // { dg-error "the .#.proc_macro_attribute.. attribute may only be used on bare functions" }
54 #[proc_macro_attribute] // { dg-error "the .#.proc_macro_attribute.. attribute may only be used on bare functions" }
55 impl MyTrait for MyStruct {}
57 #[proc_macro_attribute] // { dg-error "the .#.proc_macro_attribute.. attribute may only be used on bare functions" }