From: Pierre-Emmanuel Patry <[email protected]>

Kernel and core related tests as well as their core crate needs to be
compiled with a matching rust edition. In order to enforce that we
control the edition from the testsuite instead of relying on a per crate
edition change. Moreover, the kernel and core 1.49 is meant to be
compiled with rust edition 2018, using this edition will make things
easier for us.

gcc/testsuite/ChangeLog:

        * rust/minicore/minicore.exp: Enforce crate edition at test top level.

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/59b64b9dc6142d7dc7d389a0ada5404ccfef37be

The commit has NOT been mentioned in any issue.

The commit has been mentioned in the following pull-request(s):
 - https://github.com/Rust-GCC/gccrs/pull/4758

 gcc/testsuite/rust/minicore/minicore.exp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/rust/minicore/minicore.exp 
b/gcc/testsuite/rust/minicore/minicore.exp
index 141f438a8..b2b4ee7e2 100644
--- a/gcc/testsuite/rust/minicore/minicore.exp
+++ b/gcc/testsuite/rust/minicore/minicore.exp
@@ -44,9 +44,9 @@ proc rs-compile-with-core { src1 } {
        }
        
     # compile core
-    gcc-dg-runtest [lindex ${src_list} 0] "" "-frust-crate=core"
+    gcc-dg-runtest [lindex ${src_list} 0] "" "-frust-crate=core 
-frust-edition=2018"
     # compile test
-    gcc-dg-runtest $src1 "" ""
+    gcc-dg-runtest $src1 "" "-frust-edition=2018"
 }
 
 foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.rs]] {
-- 
2.55.0

Reply via email to