Crates of type 'proc-macro' should not have any other pub member than
procedural macros. These new test will avoid regression on error
messages in such sitation.
gcc/testsuite/ChangeLog:
* rust/compile/proc_macro_pub_function.rs: New test.
* rust/compile/proc_macro_pub_module.rs: New test.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
--- /dev/null
+// { dg-additional-options "-frust-crate-type=proc-macro" }
+
+pub fn wild_pub_function() {} // { dg-error ".proc-macro. crate types currently cannot export any items other than functions tagged with .#.proc_macro.., .#.proc_macro_derive.. or .#.proc_macro_attribute.." }
--- /dev/null
+// { dg-additional-options "-frust-crate-type=proc-macro" }
+
+pub fn wild_pub_module() {} // { dg-error ".proc-macro. crate types currently cannot export any items other than functions tagged with .#.proc_macro.., .#.proc_macro_derive.. or .#.proc_macro_attribute.." }