[gccrs COMMIT 06/10] Add macro_export to concat macro
gerris.rs@gmail.com
gerris.rs@gmail.com
Tue Mar 31 09:40:32 GMT 2026
From: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
This macro export is required with recent rust versions but not version
1.49. Since the test was not trying to highlight this rust 1.49 behavior
this commit put the least constrained version of the code.
gcc/testsuite/ChangeLog:
* rust/compile/doc_macro.rs: Add macro_export on macro.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
---
This change was merged into the gccrs repository and is posted here for
upstream visibility and potential drive-by review, as requested by GCC
release managers.
Each commit email contains a link to its details on github from where you can
find the Pull-Request and associated discussions.
Commit on github: https://github.com/Rust-GCC/gccrs/commit/803dabb23cb9bb6dbe13917876db70e764ea9dbf
The commit has been mentioned in the following pull-request(s):
- https://github.com/Rust-GCC/gccrs/pull/4505
gcc/testsuite/rust/compile/doc_macro.rs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/testsuite/rust/compile/doc_macro.rs b/gcc/testsuite/rust/compile/doc_macro.rs
index dff69baad..e2c84a7e1 100644
--- a/gcc/testsuite/rust/compile/doc_macro.rs
+++ b/gcc/testsuite/rust/compile/doc_macro.rs
@@ -4,6 +4,10 @@
#![feature(extended_key_value_attributes)]
#![doc = concat!("AB")]
+// This macro export should not be required for rust 1.49 because inner
+// attributes are resolved after the macros, however it is required in newer
+// versions of rustc.
+#[macro_export]
#[rustc_builtin_macro]
macro_rules! concat {
() => {{}};
--
2.53.0
More information about the Gcc-rust
mailing list