Message ID | 20240130121026.807464-100-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 gs7csp1196739dyb; Tue, 30 Jan 2024 04:54:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IEf+RWzUQRVpV2ChjPISwsGL/UlJGjkgBbYDgG3TPIq/TRPFzbbX2sN1TKNqRqwsvfzR/h1 X-Received: by 2002:a05:6214:f08:b0:68c:3870:d719 with SMTP id gw8-20020a0562140f0800b0068c3870d719mr9422039qvb.29.1706619277865; Tue, 30 Jan 2024 04:54:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706619277; cv=pass; d=google.com; s=arc-20160816; b=NrDaianYWpu7hvel+fbCPtAUpzQorGqcfa9CC4YBLzx2ssL12HkrRd7g7/D5uspj4F bLGLZ1EvcWR7ucjBwYSI9bJefTt9JmVGCnTD+KsbZt4j2O2M6VYAXN+5pTk2UwAgMLgz x66UbqD95NjT9ADqBCHA0AlEA30KzSwdPsgOUuPV6Auig0jhZaisgtIUkipM7JIDBkj1 urEQpuYsMcBOKxPAn3ijd8tEod0goFNcncmFLOs968jHR1o/sdUJZ4YNCF4NYNve3v3K NCT4NZYdG3IFaJeY5RqL52jXxtp2MtvxWUf6GfdK4Kmq9rpf7Mc2NpefUsiUwhI/mZz5 ou+A== 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=fWctQIQWuXNo2W2D7XmPH/C4uTQo2S8lFrAjloL8E0E=; fh=tF/FjG7igJhcOEGq79wqr3ldeoZUVk5V7TNEGxaLUD4=; b=WtZ2XPFAfT3aS5H7+iS5vDCUd8tg+rF8NmSBh8dxyWfkWykzcD1ywEyqriX3dzN9P1 FV4LRgng2XbVhxx7BgXP2SpheyxhjTLLvaRFmLsmFDCC+398MmGO0/xir3KFuLYX2R6R lsipZhzgil6p7j0CjQwxio4I2yA3Qy0Jf2yWEEsGF+xhDM73C78rRYhXP55uK+6jka41 t9acCeHZv1yqNs1RRqj6meJLHFhb8hBfDhEP8/zmwGbG4c2pZlxE7dEYEvWL6q2LR1P3 7NINk5xIvrl4714n+WFUlGkSNUE7Ik7LsN2ODowdIJcgfXBSidxt2VbY0lO3f+7CEm7P rjQQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=CxDKtrRk; 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 m10-20020ad45dca000000b0068179e48e97si9780522qvh.164.2024.01.30.04.54.37 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 04:54:37 -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=CxDKtrRk; 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 8884C3870860 for <ouuuleilei@gmail.com>; Tue, 30 Jan 2024 12:54:37 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id B516D3857729 for <gcc-patches@gcc.gnu.org>; Tue, 30 Jan 2024 12:12:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B516D3857729 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 B516D3857729 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::42d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706616775; cv=none; b=iic04YKCDBPV5q5/nn61Ky1/k5CJhGBYT/fWIEPNPX/mm6twulJoihmR9fQbv0/B4Diyv//4EcjU9v6iafhlnK5k8KmjbOM2lYxBmGrSepAVARWHD3otbgB/uzVsEIuBzFyHtm1nybeq62Due0oHaxR6R0qEopoWIuzeIzYj2GA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706616775; c=relaxed/simple; bh=GYFIXQqA76iGlkyus+RoxHBsrq0N7RaEQ+AYtrO+nKY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=VZkihUAaILI2d6m27YyroCqhdMeqWXZ9RPnp5JHgp2ITPVEO7c29cilkJwaRgD1NPHa+oEDXyoacNJuVeGflyAvlEafE2ot4f4S08YRcit+0OhgBVrlQRocIhT8M/Z3sygomE6yTG7FDDe6moPQjk5dRPh90arEKmcX3LFfg6A0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-33adec41b55so3617784f8f.0 for <gcc-patches@gcc.gnu.org>; Tue, 30 Jan 2024 04:12:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1706616718; x=1707221518; 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=fWctQIQWuXNo2W2D7XmPH/C4uTQo2S8lFrAjloL8E0E=; b=CxDKtrRkF4HPAHtM983TjwtfGyK0GeHbnjkHV32n+Gl8vWxo7+BKO1EsCHR9PKMQQ8 4+LhT0X6Owxo5bOhu+CBvNfkSs5EvEuU5eNkxfMFroNyVwEPvsNEg/fc//N6WjGWhEyP GYbsxRHrRm3PTPthFf2AIzspVROnzBt/YINJCMTRlrcmvuBFP+r137mkMhwJMU25cG9d lFiOn4tLHOdmFWuvdetxedmsYyS0cGnZujUWgzu7GE2wGACW6CtPfgml99PzqIJNA+pA 2Irrywteze2rJ4jgJ3mmXBmCVqLehXURX+aWqd7Bq271LURTTVex9bWCIY2KG1e6w56T 3q5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706616718; x=1707221518; 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=fWctQIQWuXNo2W2D7XmPH/C4uTQo2S8lFrAjloL8E0E=; b=GOWnqOy4xbdhpffs98wjZmtyCeLSh7o5/VDu/W/c5Q2PrvIeDasKfD7rDnMq35dulN u6mC+y4apNmYYXpJoE9nfGOSHbsB860gEki0HlsLM/NB0RNNOKUAnyMDljnUxo7Je9FW Ax0Yo3LiQ3Hi04NMnWYB/89AzzR7MxfSEDmeyIW67tOHzUGR8/tN7X8XcwyODeRxKcIl XDdTxGzes94O/L1bJ+0jIxo8/aJ2vmk8YyL4ugXyPRO2R2nXpjDbClnr4Lz9warWUJAI AQ2tbFo4qUGo2OFFG3bvT+aCrwVrzpl6oQiCrE330XQlfSinlQivftoJrBcpP0es4pcg Fy+Q== X-Gm-Message-State: AOJu0YxCZCJM2Ghs11XsBUHMMjJJfv2NfxU67ZkUcxjqHlVk5Qdn1Euw NXs65MJDjZRQMp/Cd1gvC+t0JVGlGVzQ+okwwJ6AKy05MaPzFvSrC1tHrCeDrxr+Bc9qIu8bbEp Bpw== X-Received: by 2002:a05:6000:78d:b0:33a:f681:699e with SMTP id bu13-20020a056000078d00b0033af681699emr1883574wrb.21.1706616718560; Tue, 30 Jan 2024 04:11:58 -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.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 04:11:58 -0800 (PST) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Jakub Dupak <dev@jakubdupak.com> Subject: [COMMITTED 097/101] gccrs: AST: Fix for lifetime lowering Date: Tue, 30 Jan 2024 13:07:53 +0100 Message-ID: <20240130121026.807464-100-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: 1789520015939562596 X-GMAIL-MSGID: 1789520015939562596 |
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: Jakub Dupak <dev@jakubdupak.com> gcc/rust/ChangeLog: * hir/rust-ast-lower-type.cc (ASTLoweringTypeBounds::visit): fix for lifetimes (ASTLowerWhereClauseItem::visit): fix for lifetimes Signed-off-by: Jakub Dupak <dev@jakubdupak.com> --- gcc/rust/hir/rust-ast-lower-type.cc | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/gcc/rust/hir/rust-ast-lower-type.cc b/gcc/rust/hir/rust-ast-lower-type.cc index a0178ebf490..504ca051f59 100644 --- a/gcc/rust/hir/rust-ast-lower-type.cc +++ b/gcc/rust/hir/rust-ast-lower-type.cc @@ -529,8 +529,13 @@ ASTLoweringTypeBounds::translate (AST::TypeParamBound *type) void ASTLoweringTypeBounds::visit (AST::TraitBound &bound) { - // FIXME - std::vector<HIR::LifetimeParam> lifetimes; + std::vector<HIR::LifetimeParam> for_lifetimes; + for (auto &lifetime_param : bound.get_for_lifetimes ()) + { + auto generic_param = ASTLowerGenericParam::translate (&lifetime_param); + for_lifetimes.push_back ( + *static_cast<HIR::LifetimeParam *> (generic_param)); + } AST::TypePath &ast_trait_path = bound.get_type_path (); HIR::TypePath *trait_path = ASTLowerTypePath::translate (ast_trait_path); @@ -543,8 +548,9 @@ ASTLoweringTypeBounds::visit (AST::TraitBound &bound) BoundPolarity polarity = bound.has_opening_question_mark () ? BoundPolarity::AntiBound : BoundPolarity::RegularBound; - translated = new HIR::TraitBound (mapping, *trait_path, bound.get_locus (), - bound.is_in_parens (), polarity); + translated + = new HIR::TraitBound (mapping, *trait_path, bound.get_locus (), + bound.is_in_parens (), polarity, for_lifetimes); } void @@ -596,6 +602,13 @@ ASTLowerWhereClauseItem::visit (AST::TypeBoundWhereClauseItem &item) // FIXME std::vector<HIR::LifetimeParam> for_lifetimes; + for (auto &lifetime_param : item.get_for_lifetimes ()) + { + auto generic_param = ASTLowerGenericParam::translate (&lifetime_param); + for_lifetimes.push_back ( + *static_cast<HIR::LifetimeParam *> (generic_param)); + } + std::unique_ptr<HIR::Type> bound_type = std::unique_ptr<HIR::Type> ( ASTLoweringType::translate (item.get_type ().get ()));