public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] gccrs: Remove bad error message on checking function arguments
@ 2023-02-07 17:56 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2023-02-07 17:56 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:1b0794c172c4e60ee4cd7f2fd3a2426997b1d0a1

commit 1b0794c172c4e60ee4cd7f2fd3a2426997b1d0a1
Author: Philip Herron <herron.philip@googlemail.com>
Date:   Sat Feb 4 23:02:31 2023 +0000

    gccrs: Remove bad error message on checking function arguments
    
    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

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

diff --git a/gcc/rust/typecheck/rust-tyty-call.cc b/gcc/rust/typecheck/rust-tyty-call.cc
index 6ff0113e66b..4010c6079cc 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 }
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-07 17:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-07 17:56 [gcc/devel/rust/master] gccrs: Remove bad error message on checking function arguments Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).