gccrs: attributes: Add #[macro_use] as builtin

gcc/rust/ChangeLog:

	* util/rust-attributes.cc: Add `macro_use` to list of builtin
	attributes.

gcc/testsuite/ChangeLog:

	* rust/compile/macro_export_1.rs: New test.
This commit is contained in:
Arthur Cohen
2022-09-13 16:30:28 +02:00
parent ff9d7741d4
commit 739d0509ed
2 changed files with 3 additions and 0 deletions

View File

@@ -40,6 +40,7 @@ static const BuiltinAttrDefinition __definitions[]
{"no_mangle", CODE_GENERATION},
{"repr", CODE_GENERATION},
{"path", EXPANSION},
{"macro_use", NAME_RESOLUTION},
// From now on, these are reserved by the compiler and gated through
// #![feature(rustc_attrs)]
{"rustc_inherit_overflow_checks", CODE_GENERATION}};

View File

@@ -0,0 +1,2 @@
#[macro_use]
mod foo {}