diff mbox series

[020/125] gccrs: Adjust error checks to match name resolution 2.0

Message ID 20240801145809.366388-22-arthur.cohen@embecosm.com
State New
Headers show
Series [001/125] Rust: Make 'tree'-level 'MAIN_NAME_P' work | expand

Commit Message

Arthur Cohen Aug. 1, 2024, 2:56 p.m. UTC
From: Owen Avery <powerboat9.gamer@gmail.com>

gcc/testsuite/ChangeLog:

	* rust/compile/bad_stmt_enums.rs: Adjust redefinition error.
	* rust/compile/bad_toplevel_enums.rs: Likewise.
	* rust/compile/redef_error1.rs: Likewise.
	* rust/compile/redef_error3.rs: Likewise.
	* rust/compile/redef_error4.rs: Likewise.
	* rust/compile/redef_error6.rs: Likewise.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
---
 gcc/testsuite/rust/compile/bad_stmt_enums.rs     | 6 +++---
 gcc/testsuite/rust/compile/bad_toplevel_enums.rs | 6 +++---
 gcc/testsuite/rust/compile/redef_error1.rs       | 2 +-
 gcc/testsuite/rust/compile/redef_error3.rs       | 2 +-
 gcc/testsuite/rust/compile/redef_error4.rs       | 2 +-
 gcc/testsuite/rust/compile/redef_error6.rs       | 2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/gcc/testsuite/rust/compile/bad_stmt_enums.rs b/gcc/testsuite/rust/compile/bad_stmt_enums.rs
index 7b09a94fd27..b83137f96b8 100644
--- a/gcc/testsuite/rust/compile/bad_stmt_enums.rs
+++ b/gcc/testsuite/rust/compile/bad_stmt_enums.rs
@@ -5,17 +5,17 @@  fn main ()
       Alpha { alpha: i32 },
       pub Beta (u8),
       pub Gamma,
-      Gamma { gamma: u32 } // { dg-error "redefined" }
+      Gamma { gamma: u32 } // { dg-error "defined multiple times" }
     }
 
   struct EE2 { }
-  enum EE2 { } // { dg-error "redefined" }
+  enum EE2 { } // { dg-error "defined multiple times" }
 
   enum EE1
     {
       pub Alpha,
       Beta = 41,
-      Beta = 42, // { dg-error "redefined" }
+      Beta = 42, // { dg-error "defined multiple times" }
       pub Gamma = 3,
       D,
     }
diff --git a/gcc/testsuite/rust/compile/bad_toplevel_enums.rs b/gcc/testsuite/rust/compile/bad_toplevel_enums.rs
index b655e30a93d..137095bf00c 100644
--- a/gcc/testsuite/rust/compile/bad_toplevel_enums.rs
+++ b/gcc/testsuite/rust/compile/bad_toplevel_enums.rs
@@ -3,17 +3,17 @@  pub enum E
   pub A { a: i32 },
   B (u8),
   pub C,
-  B // { dg-error "redefined" }
+  B // { dg-error "defined multiple times" }
 }
 
 enum E2 { }
-struct E2 { } // { dg-error "redefined" }
+struct E2 { } // { dg-error "defined multiple times" }
 
 enum E1
 {
   A,
   pub B = 42,
   C = 3,
-  A { a: u8 }, // { dg-error "redefined" }
+  A { a: u8 }, // { dg-error "defined multiple times" }
   pub D
 }
diff --git a/gcc/testsuite/rust/compile/redef_error1.rs b/gcc/testsuite/rust/compile/redef_error1.rs
index ae51e36c87f..5a85f1e50fe 100644
--- a/gcc/testsuite/rust/compile/redef_error1.rs
+++ b/gcc/testsuite/rust/compile/redef_error1.rs
@@ -3,6 +3,6 @@  struct S1 {
     y: f64,
 }
 
-struct S1(i32, bool); // { dg-error "redefined multiple times" }
+struct S1(i32, bool); // { dg-error "defined multiple times" }
 
 fn main() {}
diff --git a/gcc/testsuite/rust/compile/redef_error3.rs b/gcc/testsuite/rust/compile/redef_error3.rs
index a4bf1ed3d8c..cc1cceba8bb 100644
--- a/gcc/testsuite/rust/compile/redef_error3.rs
+++ b/gcc/testsuite/rust/compile/redef_error3.rs
@@ -2,7 +2,7 @@  fn test() -> bool {
     true
 }
 
-fn test() -> i32 { // { dg-error "redefined multiple times" }
+fn test() -> i32 { // { dg-error "defined multiple times" }
     123
 }
 
diff --git a/gcc/testsuite/rust/compile/redef_error4.rs b/gcc/testsuite/rust/compile/redef_error4.rs
index a250c0ac00e..3faebb75abe 100644
--- a/gcc/testsuite/rust/compile/redef_error4.rs
+++ b/gcc/testsuite/rust/compile/redef_error4.rs
@@ -9,7 +9,7 @@  impl Foo {
         test()
     }
 
-    fn test() -> bool { // { dg-error "redefined multiple times" }
+    fn test() -> bool { // { dg-error "defined multiple times" }
         true
     }
 }
diff --git a/gcc/testsuite/rust/compile/redef_error6.rs b/gcc/testsuite/rust/compile/redef_error6.rs
index 664c6ae9894..f7f688b5f36 100644
--- a/gcc/testsuite/rust/compile/redef_error6.rs
+++ b/gcc/testsuite/rust/compile/redef_error6.rs
@@ -5,7 +5,7 @@  impl Foo<i32> {
         123
     }
 
-    fn test(self) -> i32 { // { dg-error "redefined multiple times" }
+    fn test(self) -> i32 { // { dg-error "defined multiple times" }
         self.0
     }
 }