[COMMITTED 26/43] gccrs: Add macro_export to concat macro
arthur.cohen@embecosm.com
arthur.cohen@embecosm.com
Tue Apr 14 23:18:47 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>
---
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 dff69baad07..e2c84a7e1e0 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.50.1
More information about the Gcc-rust
mailing list