Debian Codegraph @

gcc/testsuite/rust/compile/macros/proc/non_root_trait_method.rs

raw
1 // { dg-additional-options "-frust-crate-type=proc-macro" }
2
3 trait SomeTrait {}
4
5 struct DummyStruct;
6
7 impl DummyStruct {
8 pub fn method(self) {
9 #[proc_macro_derive(SomeTrait)]
10 pub fn non_root_function() {} // { dg-error "functions tagged with .#.proc_macro_derive.. must currently reside in the root of the crate" }
11 }
12 }