public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Thomas Schwinge <tschwinge@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/rust/master] gccrs: Remove bad error message on checking function arguments Date: Tue, 7 Feb 2023 17:56:31 +0000 (GMT) [thread overview] Message-ID: <20230207175631.A7CE33858C36@sourceware.org> (raw) 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 } }
reply other threads:[~2023-02-07 17:56 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230207175631.A7CE33858C36@sourceware.org \ --to=tschwinge@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).