[gcc r16-5861] gccrs: Add missing test for lang item feature gate
Arthur Cohen
cohenarthur@gcc.gnu.org
Wed Dec 3 12:39:04 GMT 2025
https://gcc.gnu.org/g:274ac329f2dfc84cda8350461370eaca4033f712
commit r16-5861-g274ac329f2dfc84cda8350461370eaca4033f712
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date: Sat Nov 29 01:56:52 2025 +0100
gccrs: Add missing test for lang item feature gate
We recently modified all tests with lang items to add the lang feature
gate switch but we did not introduce any test to check that a proper
error message is printed when this switch is not used.
gcc/testsuite/ChangeLog:
* rust/compile/lang_feature_gate.rs: New test.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diff:
---
gcc/testsuite/rust/compile/lang_feature_gate.rs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/testsuite/rust/compile/lang_feature_gate.rs b/gcc/testsuite/rust/compile/lang_feature_gate.rs
new file mode 100644
index 000000000000..4cd485ec6ea9
--- /dev/null
+++ b/gcc/testsuite/rust/compile/lang_feature_gate.rs
@@ -0,0 +1,2 @@
+#[lang = "sized"] // { dg-error "lang items are subject to change. add .#!.feature.lang_items... to the crate attributes to enable" }
+pub trait Sized {}
More information about the Gcc-cvs
mailing list