]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Remove bad error message on checking function arguments
authorPhilip Herron <herron.philip@googlemail.com>
Sat, 4 Feb 2023 23:02:31 +0000 (23:02 +0000)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 6 Apr 2023 08:47:21 +0000 (10:47 +0200)
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
gcc/testsuite/rust/compile/func3.rs

index 4c6442e2d829f9e2662876ac714022e4f03b1bb0..67e2866cbce70a07be152bb5ef1f04eec056a897 100644 (file)
@@ -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 ());
        }
 
index 2a329476118748293b6244330a2f5ce859cf3d8e..002e5c90ab5cb1f5183d75c7e8a7354ea131995e 100644 (file)
@@ -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 }
 }