From: Harishankar <[email protected]>
Fixes Rust-GCC/gccrs#3931
gcc/testsuite/ChangeLog:
* rust/compile/issue-3931.rs: New test.
Signed-off-by: Harishankar <[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/5d80c76a57265bc7183af4a6040104fdca371702
The commit has been mentioned in the following pull-request(s):
- https://github.com/Rust-GCC/gccrs/pull/4485
gcc/testsuite/rust/compile/issue-3931.rs | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 gcc/testsuite/rust/compile/issue-3931.rs
diff --git a/gcc/testsuite/rust/compile/issue-3931.rs
b/gcc/testsuite/rust/compile/issue-3931.rs
new file mode 100644
index 000000000..27d535c1b
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-3931.rs
@@ -0,0 +1,16 @@
+#![feature(no_core)]
+#![no_core]
+
+trait Foo {
+ fn foo();
+}
+
+impl Foo for [(); 1] { // { dg-error "missing foo in implementation of trait
.Foo. " }
+ fn main() { // { dg-error "method .main. is not a member of trait
.Foo." }
+ <[(); 0] as Foo>::foo()
+ }
+}
+
+fn main() {
+ <[(); 0] as Foo>::foo()
+}
\ No newline at end of file
base-commit: 49e06bfda45f38543e4a5834b273f0c4d657a3d5
--
2.53.0