From: Pierre-Emmanuel Patry <[email protected]>
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 <[email protected]>
---
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