Skip to content

Commit

Permalink
Add a new test for const without body
Browse files Browse the repository at this point in the history
This new regression test highlight the fixed behavior for 2709.

gcc/testsuite/ChangeLog:

	* rust/compile/issue-2709.rs: New test.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
  • Loading branch information
P-E-P authored and CohenArthur committed Nov 6, 2023
1 parent 0687534 commit 2c862b9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gcc/testsuite/rust/compile/issue-2709.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
fn main() {}

struct S;

impl S {
const Y: u8;
// { dg-error "associated constant in .impl. without body" "" { target *-*-* } .-1 }
}

0 comments on commit 2c862b9

Please sign in to comment.