From: Philip Herron Date: Fri, 18 Jul 2025 15:11:59 +0000 (+0100) Subject: gccrs: Add test case to show issue is fixed X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1420d244ee2e820e93a9538096fe2f1fafc6ff88;p=thirdparty%2Fgcc.git gccrs: Add test case to show issue is fixed Fixes Rust-GCC#3524 gcc/testsuite/ChangeLog: * rust/compile/issue-3524.rs: New test. Signed-off-by: Philip Herron --- diff --git a/gcc/testsuite/rust/compile/issue-3524.rs b/gcc/testsuite/rust/compile/issue-3524.rs new file mode 100644 index 00000000000..62c8c351274 --- /dev/null +++ b/gcc/testsuite/rust/compile/issue-3524.rs @@ -0,0 +1,9 @@ +struct A {} +// { dg-warning "struct is never constructed" "" { target *-*-* } .-1 } + +impl A { + fn main() {} + // { dg-warning "associated function is never used: .main." "" { target *-*-* } .-1 } +} + +fn main() {}