Message ID | 20240130121026.807464-94-arthur.cohen@embecosm.com |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1187753dyb; Tue, 30 Jan 2024 04:36:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IEop2iq4q9Gr8Ubet9693+4IiLYbpuF4ohOmsD6MfnedrdlDv7Fzq/Sj7ZrzLna0mMLNVEK X-Received: by 2002:ac8:5ccb:0:b0:42a:a59d:84dc with SMTP id s11-20020ac85ccb000000b0042aa59d84dcmr4606745qta.111.1706618188349; Tue, 30 Jan 2024 04:36:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706618188; cv=pass; d=google.com; s=arc-20160816; b=Mvsa5tKLW30sIueTl/sW4C+VcgibpT0v/ZbNsDgBDkX4rqTMS1BTbF5Y0C8/bNYOsh /27yX86TFVtpeqliaQdj/BoYdK0afoDyKyP61LZO27Cfu3Njh33jeMwMTfBwr7wGZ91C vElV/IhGKVf3FjVv8igvGvGz6jjQ7ZmAlKt3SO/ruXKnSdsYRhZAd/T1mGgIajumTESX 5367ds3ahANqJZYVdMxuNZwrk6XCes3DqTWkdS3i8P6h8sb5gWaEDQrWSpJMSY+zQVZY NdYF28lrB1rvezxaKwaxIedh7d308Bnp5lacSifqPxETurLSaKVeec56d3mH1YktW8lh nkUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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:arc-filter:dmarc-filter:delivered-to; bh=R/Zvf/9U+8sG3wZO2cPIvZBL9MVjRAAvW6Reqcow5k8=; fh=l06p/z5UT27+088UaGrnZSJk+7w7syaJEbG8CLKfrIk=; b=A3c1+nnmz02iR8mdW85fYhSHIkOIyMUprOxMYEG07q4pW2mrJKETj/mLvMAbzVFfAa 5/pnfkJKjY5qQJ/UIHM8/g5GrHxiX5BT9mkb0XbYQZu6WJgOkBje187EhILRB34ydvCT 1n9Xor0A5vbAvY/oJ2aaNwvJr8cNQJ0uUR/XK4EvZI8cB4nQW6I6INXzUSvnU24Evjh+ 8NNyCbQuDsB/2fvBVChdSJ2AT+t8pIW9CItPzoqTYuhm7euvXZZJGUQngF4LntWCoIBz 7Sb551ambrLrBkc3QfTNeSeLNq3m8MBf3azTId+7Q21NoduE0Y+f18uI5Lh68kVxfkGM QkOQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=SP1k9FfG; arc=pass (i=1); 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 (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id n21-20020a05622a11d500b0042a43622ca8si9923766qtk.75.2024.01.30.04.36.28 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 04:36:28 -0800 (PST) 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=SP1k9FfG; arc=pass (i=1); 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 DF36D3882066 for <ouuuleilei@gmail.com>; Tue, 30 Jan 2024 12:35:55 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id 4ED0F3857728 for <gcc-patches@gcc.gnu.org>; Tue, 30 Jan 2024 12:11:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4ED0F3857728 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4ED0F3857728 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::42a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706616771; cv=none; b=dN9qSxCQwnKPFjwYZr+i1YtpAaFxDwgKTkBIWa6Fu8N5nEY5U4pTUp5XerNKF3DPa3u0OHiNgdb1OTNypfEeIGM6IerdRznZ2Jl/HAeG7uPtRl6z6jEOJfvITKDgHoX9VEW5tyHacsKDaGHe6AvwwpgVxVYYX+f5/gAdrmOx5WY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706616771; c=relaxed/simple; bh=clU+cbOvB/WJLKNqgKSLulW7CNlZKYsbCuw1KG+qPDE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=wjb4ZkdLPQMR2xvB+p1hmJnVHVGceoQhKl/g65ZE3d7dGb/ukVatdv2iykktsBHA08LHqQN5l8GYM4wawM4xLGggOt0wMBRVkwKTiVXCkLpzWYjbXvfVFSqaAflM28bk3oztqJHDHV7j7WonNIQ6GucjzIOUtrVAWsQnzTcJsO4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-33934567777so3029647f8f.1 for <gcc-patches@gcc.gnu.org>; Tue, 30 Jan 2024 04:11:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1706616715; x=1707221515; darn=gcc.gnu.org; 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=R/Zvf/9U+8sG3wZO2cPIvZBL9MVjRAAvW6Reqcow5k8=; b=SP1k9FfGcw8TQm27DUNY4mijoDHEShX5EGaYUP+sRgoKpOgSTS1NV40MyrOj1rkpyt ipkswf2ToG14Mb3RQ+fQe2qUImvcg3NEkak3XIim3kcUclF3xBL6L6wKzavqwKK6KBlG 4UtyB1KGH8KAOIIm+Gwinvb7J0SLtJkoQlJh41Gtp3HJhayT7lCpiUyRNDgSJxNDYTQA yTkC4BpKzrZ8lGnvkl0a0UnkCQWlgguiUJOkov21AkDsWyBVQOq1kWZC7/TcXLIQrpUD 2aUWdoeSzRkIlkOJPnXoUkkDpz57FrT0gnyCSjav0n6CqH/1OtiTQ6+C+fVIGEL4XQAW C2mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706616715; x=1707221515; 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=R/Zvf/9U+8sG3wZO2cPIvZBL9MVjRAAvW6Reqcow5k8=; b=e13FRRYPHsN7eLZGBBWLsgFNqc5f2SOrld3S3ZJAlvnp+bFysA/D6TdbC4+hLZ6r32 cBa6IcOyYqlwQXJB8n4/+TXdzUq6WhSnsGWB1PY7rNszpEa7QJ3epq4W0BLQEZ5U72cg 7OVm/lcl0pM/CZA+Q2q4PyS34TlCCopB6fVM4j7R0JVknVIm4vXo2pNRbQfJ3KiT7nT4 BB0xPzGCf50KJcO4qC6RAct1PgsgsIGc0/cHPfVpQPhfXx/1uHJjmilcMX2LKfBkqVPJ 1HmZSziKQz5XDNVB+7mZX5f3ily4x41bzCMk//adganrFONJ+k8/tEPXnURvyYNqY1Cf eUYA== X-Gm-Message-State: AOJu0YyttnQ1k8fdvEbmnmfQdMetcm/pGTLvJioyvOhc1cwm+go+QEu/ 12Y0dnUEqxU0YETOnC557lzQ8Uxx7vF86spFpQyv7Qp0apZSmVzPTzypSRk+b+wbfA1D4x94GXo Q4A== X-Received: by 2002:adf:e311:0:b0:337:c4c1:a3af with SMTP id b17-20020adfe311000000b00337c4c1a3afmr6112398wrj.35.1706616715474; Tue, 30 Jan 2024 04:11:55 -0800 (PST) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id f9-20020a056000036900b00339307d9d31sm10569894wrf.112.2024.01.30.04.11.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 04:11:55 -0800 (PST) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Kushal Pal <kushalpal109@gmail.com> Subject: [COMMITTED 091/101] gccrs: Handle `async` keyword for regular implementations Date: Tue, 30 Jan 2024 13:07:47 +0100 Message-ID: <20240130121026.807464-94-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20240130121026.807464-2-arthur.cohen@embecosm.com> References: <20240130121026.807464-2-arthur.cohen@embecosm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.2 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, T_SCC_BODY_TEXT_LINE autolearn=ham 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.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Reply-To: arthur.cohen@embecosm.com Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789518873863066419 X-GMAIL-MSGID: 1789518873863066419 |
Series |
[COMMITTED,001/101] gccrs: Add visibility to trait item
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Arthur Cohen
Jan. 30, 2024, 12:07 p.m. UTC
From: Kushal Pal <kushalpal109@gmail.com> Fixes #2788 gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_inherent_impl_item): Added switch-case for ASYNC token. gcc/testsuite/ChangeLog: * rust/compile/issue-2788.rs: New test. Signed-off-by: Kushal Pal <kushalpal109@gmail.com> --- gcc/rust/parse/rust-parse-impl.h | 1 + gcc/testsuite/rust/compile/issue-2788.rs | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 gcc/testsuite/rust/compile/issue-2788.rs
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index 3055a3959cf..c14c75ce70d 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -5600,6 +5600,7 @@ Parser<ManagedTokenSource>::parse_inherent_impl_item () return nullptr; } } + case ASYNC: case EXTERN_KW: case UNSAFE: case FN_KW: diff --git a/gcc/testsuite/rust/compile/issue-2788.rs b/gcc/testsuite/rust/compile/issue-2788.rs new file mode 100644 index 00000000000..b3828fca6cb --- /dev/null +++ b/gcc/testsuite/rust/compile/issue-2788.rs @@ -0,0 +1,10 @@ +// { dg-additional-options "-frust-compile-until=lowering" } +struct Foo { + arg_1: u32, + arg_2: i32, +} + +impl Foo { + async fn asynchronous_function_1(&self) {} + async fn asynchronous_function_2() {} +}