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
This commit is contained in:
Philip Herron
2023-02-04 23:02:31 +00:00
committed by Arthur Cohen
parent 9754a60623
commit 11150b7c05
2 changed files with 0 additions and 6 deletions

View 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 ());
}

View 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 }
}