https://gcc.gnu.org/g:f863b0b78fb33ce6b3a5ef67120e6b5201d3d536

commit r17-5694-gf863b0b78fb33ce6b3a5ef67120e6b5201d3d536
Author: Pierre-Emmanuel Patry <[email protected]>
Date:   Tue Aug 4 10:33:26 2026 +0200

    gccrs: Run minicore tests with rust 2018 edition
    
    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]>

Diff:
---
 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 141f438a87d6..b2b4ee7e204f 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]] {

Reply via email to