diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-09-13 16:30:28 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-09-13 16:33:21 +0200 |
commit | c71b174a29cbd85a4961686eacd02d1fe2a36ea3 (patch) | |
tree | a132464951a1201a2fa54f231e1a874ed037f6b8 /gcc | |
parent | f252b4093666cf1e3d948b22f00fc12bf283a83f (diff) | |
download | gcc-c71b174a29cbd85a4961686eacd02d1fe2a36ea3.zip gcc-c71b174a29cbd85a4961686eacd02d1fe2a36ea3.tar.gz gcc-c71b174a29cbd85a4961686eacd02d1fe2a36ea3.tar.bz2 |
attributes: Add #[macro_use] as builtin
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/util/rust-attributes.cc | 1 | ||||
-rw-r--r-- | gcc/testsuite/rust/compile/macro_export_1.rs | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/gcc/rust/util/rust-attributes.cc b/gcc/rust/util/rust-attributes.cc index 766697a..509f70f 100644 --- a/gcc/rust/util/rust-attributes.cc +++ b/gcc/rust/util/rust-attributes.cc @@ -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}}; diff --git a/gcc/testsuite/rust/compile/macro_export_1.rs b/gcc/testsuite/rust/compile/macro_export_1.rs new file mode 100644 index 0000000..f87df08 --- /dev/null +++ b/gcc/testsuite/rust/compile/macro_export_1.rs @@ -0,0 +1,2 @@ +#[macro_use] +mod foo {} |