From: Pierre-Emmanuel Patry <[email protected]>
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 <[email protected]>
---
gcc/testsuite/rust/compile/lang_feature_gate.rs | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 gcc/testsuite/rust/compile/lang_feature_gate.rs
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 00000000000..4cd485ec6ea
--- /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 {}
--
2.50.1