[committed,54/88] gccrs: Remove bad error message on checking function arguments

Message ID 20230405140411.3016563-55-arthur.cohen@embecosm.com
State Accepted
Headers
Series [committed,01/88] gccrs: fatal_error_flag: Fix typo in error message |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Arthur Cohen April 5, 2023, 2:03 p.m. UTC
  From: Philip Herron <herron.philip@googlemail.com>

Signed-off-by: Philip Herron <herron.philip@googlemail.com>

gcc/rust/ChangeLog:

	* typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): remove error message

gcc/testsuite/ChangeLog:

	* rust/compile/func3.rs: update test case
---
 gcc/rust/typecheck/rust-tyty-call.cc | 5 -----
 gcc/testsuite/rust/compile/func3.rs  | 1 -
 2 files changed, 6 deletions(-)
  

Patch

diff --git a/gcc/rust/typecheck/rust-tyty-call.cc b/gcc/rust/typecheck/rust-tyty-call.cc
index 4c6442e2d82..67e2866cbce 100644
--- a/gcc/rust/typecheck/rust-tyty-call.cc
+++ b/gcc/rust/typecheck/rust-tyty-call.cc
@@ -140,8 +140,6 @@  TypeCheckCallExpr::visit (FnType &type)
 	    argument->get_locus ());
 	  if (resolved_argument_type->get_kind () == TyTy::TypeKind::ERROR)
 	    {
-	      rust_error_at (argument->get_locus (),
-			     "Type Resolution failure on parameter");
 	      return;
 	    }
 	}
@@ -193,8 +191,6 @@  TypeCheckCallExpr::visit (FnPtr &type)
 	TyWithLocation (argument_expr_tyty, arg_locus), argument->get_locus ());
       if (resolved_argument_type->get_kind () == TyTy::TypeKind::ERROR)
 	{
-	  rust_error_at (argument->get_locus (),
-			 "Type Resolution failure on parameter");
 	  return;
 	}
 
@@ -301,7 +297,6 @@  TypeCheckMethodCallExpr::check (FnType &type)
 	TyWithLocation (argument_expr_tyty, arg_locus), arg_locus);
       if (resolved_argument_type->get_kind () == TyTy::TypeKind::ERROR)
 	{
-	  rust_error_at (arg_locus, "Type Resolution failure on parameter");
 	  return new ErrorType (type.get_ref ());
 	}
 
diff --git a/gcc/testsuite/rust/compile/func3.rs b/gcc/testsuite/rust/compile/func3.rs
index 2a329476118..002e5c90ab5 100644
--- a/gcc/testsuite/rust/compile/func3.rs
+++ b/gcc/testsuite/rust/compile/func3.rs
@@ -5,5 +5,4 @@  fn test(a: i32, b: i32) -> i32 {
 fn main() {
     let a = test(1, true);
     // { dg-error "expected .i32. got .bool." "" { target *-*-* } .-1 }
-    // { dg-error "Type Resolution failure on parameter" "" { target *-*-* } .-2 }
 }