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]>
---
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/6538b15103877b31b8176daccfddd627b094df87

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

 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 000000000..4cd485ec6
--- /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 {}

base-commit: 12adbc3130dd2352e628a3ee992645d05b3ff046
-- 
2.51.2

Reply via email to