gcc/testsuite/rust/compile/macros/proc/attribute_non_root_method.rs
raw| 1 | // { dg-additional-options "-frust-crate-type=proc-macro" } |
| 2 | |
| 3 | struct DummyStruct; |
| 4 | |
| 5 | impl DummyStruct { |
| 6 | pub fn method(self) { |
| 7 | #[proc_macro_attribute] |
| 8 | pub fn non_root_function() {} // { dg-error "functions tagged with .#.proc_macro_attribute.. must currently reside in the root of the crate" } |
| 9 | } |
| 10 | } |