Skip to content

Commit

Permalink
Add a regression test for super trait on auto trait
Browse files Browse the repository at this point in the history
Add a new regression test to highlight the error behavior with a super
trait on an auto trait.

gcc/testsuite/ChangeLog:

	* rust/compile/auto_trait_super_trait.rs: New test.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
  • Loading branch information
P-E-P committed Nov 21, 2023
1 parent e361ece commit 1786c4f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gcc/testsuite/rust/compile/auto_trait_super_trait.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
trait Cold {}

auto trait IsCool: Cold {}
// { dg-error "auto traits cannot have super traits .E0568." "" { target *-*-* } .-1 }

0 comments on commit 1786c4f

Please sign in to comment.