From 8d0a6e905ea44fb1cb4bad9c026e03fa07aed8d1 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Thu, 18 Apr 2024 22:39:47 +0200 Subject: gccrs: Add a test for inherent impl type name resolve A previous bug with name resolution 2.0 was caused by an incorrectly resolved inherent impl name. This test shall highlight the behavior and prevent regression. gcc/testsuite/ChangeLog: * rust/compile/name_resolution25.rs: New test. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/name_resolution25.rs | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 gcc/testsuite/rust/compile/name_resolution25.rs (limited to 'gcc') diff --git a/gcc/testsuite/rust/compile/name_resolution25.rs b/gcc/testsuite/rust/compile/name_resolution25.rs new file mode 100644 index 0000000..3cacac7 --- /dev/null +++ b/gcc/testsuite/rust/compile/name_resolution25.rs @@ -0,0 +1,5 @@ +// { dg-options "-frust-name-resolution-2.0" } + +struct Test; // { dg-warning "struct is never constructed: .Test." } + +impl Test {} -- cgit v1.1