From patchwork Wed Apr 5 14:03:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Cohen X-Patchwork-Id: 79710 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp360303vqo; Wed, 5 Apr 2023 07:43:27 -0700 (PDT) X-Google-Smtp-Source: AKy350YbO1xMgjbqOWOy8PfRySuiYxNyDuY+wMSoONsQHYX0F8EgWZzDjDUZHGI57SRSSkOZTIvV X-Received: by 2002:a17:906:53c3:b0:947:791b:fdcb with SMTP id p3-20020a17090653c300b00947791bfdcbmr2844867ejo.21.1680705807460; Wed, 05 Apr 2023 07:43:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680705807; cv=none; d=google.com; s=arc-20160816; b=nrVlpwQN8A+Rrz2Siz1AGpa+bTGh1PU+jBza7arGnk+uZODY4j9bqxs2i8MoaT1TDT ZwnkO5SYA4yBEsW2a31qEiqmr2cC4ZR6qpELHzFlbYQP+cxKCPVu/Y7Ho4j/62rNxlI6 sfhTAYYU3GHqd/KthP3RoOPL4e5+yyvINhaVssSD9GyIxKj30FfRsnYjLk2fJYQdKPhc oEGLDim3A+RkyvYAxKh/3Z0YDFHlzXpmSjGTEFhQF8Rec9JVI3xKyveMFGgc0DoZiBsY MTaGC9JDoP8iOPikKUu+PlZtV5s7yHBd+0CHI8lJ8SQPpldvusX9at+B2p/57y22NXgJ ehMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dmarc-filter :delivered-to; bh=PGjpvYFX4Kl/wH2pKgg62ebXRthGcemGu+cRhKKQn2U=; b=pVfIDOL982/0DNhmLaXB/Dho++4+jooEKWAh60FQv+eW6rfIAU6VPbUifENVYXi48U ss8H5OfoVYZM7Zy64PzQ6k/pVbtxD8dOClslSHNXaPxpUrkvRuf4E+pC/dYqfhdR//3E PkLEPh8fJEB5IUKbmLrENgqWDsR6WLDdNBNhHQnNQMdxawyszyD/RK0PdvkUr+ON7SP6 4XhQwLeU3e2jyoD9sFMdpGVutjjFhHbuOeICLPJiDzR7M8/U3++R+AWfRVt6SY4QvozY ksvvjB1hujFZakEdrJGTrel57fXYo/pTbba5Zp6qbw6qO4C9TRdQALmsYkdnYD5LJ/EX RMFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=M3J8ghys; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ky10-20020a170907778a00b00933f92e9917si12157270ejc.371.2023.04.05.07.43.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 07:43:27 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=M3J8ghys; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D4F36392EEC3 for ; Wed, 5 Apr 2023 14:15:32 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id B6C9C385417B for ; Wed, 5 Apr 2023 14:06:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B6C9C385417B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wm1-x334.google.com with SMTP id n19so20972094wms.0 for ; Wed, 05 Apr 2023 07:06:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1680703566; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=PGjpvYFX4Kl/wH2pKgg62ebXRthGcemGu+cRhKKQn2U=; b=M3J8ghysnJzBHbw0ltuPPfpa8BeLrtVX6JoaY6HTEFsnrUOwtns7ICttNcFe5joegS N9mJyYHyPiosSZ2pgrs3MJhM4HwVWpmeb07RK1OERP7y4bHvFnCvA6u314N2exhGTrbc hwydkZEitz10lDzrrC7ZdCRbeqdUI728JD6vTBBBGf8awrWVQi3mSIZciAewX6bj4aTx PdEaXuh9G9HgCXujyxAQM0BuvVv15dfsZsn74AsZ/sRTu7zy34Tk1lBhOcLHzrl4brtj pLR0h4ja7u4IPTNih+EpHfKvlwRt/LanZSMKYLrOUwNaYcaXtbPf0ZV3fPK0PFO/rlsc 7k9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680703566; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=PGjpvYFX4Kl/wH2pKgg62ebXRthGcemGu+cRhKKQn2U=; b=OIotwm3HAFsLjR1HNoEuyf7toah49P6LFNrDEMVW6Po9LtFSCCixrQXyJiCOnawDuU 8anTHTBDAKcFVNs7DGP779ipVYXmRTkOgznfcA14jNznuj3DDXetpHaopwGDdXfg1Qd8 Y5WZfA7g1XKab/2ESxiwsuUY6NXCI8IQv6AR1dEcXpmb1om0OkL8bMQPjriHvEgjWcOO dOh3mnqYeoioW+1EwmgUVmHjfRV5wUd3D3nIn7glacu+bh+CaLcF5s8PU7mfy3gUmXyy +7EEEdl9VY4xFZflsrn9TvnXF5PNXo1mZxR2WWaHaeqFsoZNZbWy/Ybeh3E5RI/YKR1X 4oTQ== X-Gm-Message-State: AAQBX9e5PL0qkPglRRx9vZ7mQBCXvSRZmUkQTsV5A/tv8bGBGu7WvhcZ Cym/pljmAIBlkm4XelnRj+UeQdEZPZtpH3eoeQ== X-Received: by 2002:a7b:c4d3:0:b0:3ed:551b:b78f with SMTP id g19-20020a7bc4d3000000b003ed551bb78fmr4674244wmk.4.1680703566304; Wed, 05 Apr 2023 07:06:06 -0700 (PDT) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id ay8-20020a05600c1e0800b003edddae1068sm2330150wmb.9.2023.04.05.07.06.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 07:06:05 -0700 (PDT) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Philip Herron Subject: [committed 54/88] gccrs: Remove bad error message on checking function arguments Date: Wed, 5 Apr 2023 16:03:38 +0200 Message-Id: <20230405140411.3016563-55-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230405140411.3016563-1-arthur.cohen@embecosm.com> References: <20230405140411.3016563-1-arthur.cohen@embecosm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: arthur.cohen@embecosm.com Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762347772887629617?= X-GMAIL-MSGID: =?utf-8?q?1762347772887629617?= From: Philip Herron Signed-off-by: Philip Herron 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(-) 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 } }