From: Pierre-Emmanuel Patry Date: Thu, 18 Apr 2024 20:39:47 +0000 (+0200) Subject: gccrs: Add a test for inherent impl type name resolve X-Git-Tag: basepoints/gcc-16~6948 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8d0a6e905ea44fb1cb4bad9c026e03fa07aed8d1;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/testsuite/rust/compile/name_resolution25.rs b/gcc/testsuite/rust/compile/name_resolution25.rs new file mode 100644 index 000000000000..3cacac7f64bd --- /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 {}