Skip to content

Commit

Permalink
Add a test for inherent impl type name resolve
Browse files Browse the repository at this point in the history
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 <pierre-emmanuel.patry@embecosm.com>
  • Loading branch information
P-E-P committed Apr 22, 2024
1 parent 973e60a commit 5b6c982
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gcc/testsuite/rust/compile/name_resolution25.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// { dg-options "-frust-name-resolution-2.0" }

struct Test; // { dg-warning "struct is never constructed: .Test." }

impl Test {}

0 comments on commit 5b6c982

Please sign in to comment.