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]>
Tested on x86_64-pc-linux-gnu.
---
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 141f438a87d..b2b4ee7e204 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