Message ID | 20240130121026.807464-43-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 gs7csp1183312dyb; Tue, 30 Jan 2024 04:29:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IHA1GYkI8ZY2+OBmC5KuVlx2/94ic+XpaW5d07pHFsFerEGHPTSP96mrhWdOW+TQemgXMqF X-Received: by 2002:a05:6214:2408:b0:68c:42c2:b6ef with SMTP id fv8-20020a056214240800b0068c42c2b6efmr1493118qvb.34.1706617744050; Tue, 30 Jan 2024 04:29:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706617744; cv=pass; d=google.com; s=arc-20160816; b=gZI8HsPHvMuFXRTyl1A8bMQBVbH8ZOe9jfFu0CiMQ3zE2nDB0upOapfsjMhpsm+qmI 5wGFc+64rW8tDDJNbvALmGryIjS5qM9uFDxjv7J+hNnNOB7clqCrB9MS0nSFGi3059PD vFS+xhguzD4pvbGEKMqyojrLbwUnQhjdmObc+kT3GsWx1dF+XzTLpYYX1Qe9tpz3Leeg JMqrJkUjmuBuvJOU4iI+zeFxPLxdhrmHoKPPXikvbs0Uz/JcVRPDmpd/28ETKuUpfeRq jCBsfyzJHdEipO4CmzEA372ElyP0qDpRvPXPBlGcldFTnjnkPVxVbfH0b5eh/wkgyYFo VClQ== 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=BKw4sa3FTLYF2rhnjQmhSXdN1b9XclNq5ftM6eb8W9Q=; fh=6KiXNvQww/MsyVplklPLl//mUuD+DtDm73nSHh4O4+g=; b=oYSNWr6nrwAsf5rR+CVwyeGJy6eYQKvp5bOIFHmzfPVuDwOej2LLt/mwSBh2VXeXYO fc5LPW01p2VPRg+qIq95mwHqc7H1/jLwQu+JGHereya/TLT76joV6uBeEREogDolotBK 2shTdcGP5ZQBK3q07HwZ4e0MCcFvPTb4x/9qS77bqJCiNpj04GE3YuA3C2ygco95v/i1 8g1ERkqX+ZbGcKYs1/X3dVZb4oFcDU7yUULtJOEgUJZiBag2+zyO1+ILeEPtAWFuyBau IH3DFqKfyGy8hPtweW/OOFgoSelGX7p3I+BYQJYABk83fp8wUghuPkifY9m2MivI2AHF aMqQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b="LTH9I/KL"; 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 r10-20020a0562140c8a00b0067f906859f3si9980674qvr.427.2024.01.30.04.29.03 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 04:29:04 -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="LTH9I/KL"; 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 136C33864815 for <ouuuleilei@gmail.com>; Tue, 30 Jan 2024 12:29:03 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id AE6A53857BBD for <gcc-patches@gcc.gnu.org>; Tue, 30 Jan 2024 12:11:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AE6A53857BBD 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 AE6A53857BBD Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::42c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706616706; cv=none; b=O3mvoPp48LiLY+7H0j3mYR3aGmmyBdTCHRURARykEF7twg4gS8rnEWr0bw8u6gv7Ll31eQ5Id9ohGPvR/v3Xfg22YdCeOcycva8CfupNUmv6ZDITPTD5MY3aCugbBvsf+w6HtliRCggoLZX6afpsOlZPCLT24XKfv1aZt2ogBEk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706616706; c=relaxed/simple; bh=GyOCtN1nI3fsNEIJ29hgyTjw2Ha1yrjAh2NplTYbg4Y=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=goN7AuIFM1/CsxDtzuHT0ttYHxuFpBsMfc2Yxe/UjD/irS0aNksr6HmQelvimTVcgSlkUdLEByjUJwRv9rbUXWIMpxM34Grxi+FVXOwtXpX3SbQ5gZMzo+Eoij7kPk5ls8zMh9RpIFfQgy64A/upN6jeaTjamdw5+QKVH8NOioA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-33ae53eb5a8so1724757f8f.3 for <gcc-patches@gcc.gnu.org>; Tue, 30 Jan 2024 04:11:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1706616680; x=1707221480; 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=BKw4sa3FTLYF2rhnjQmhSXdN1b9XclNq5ftM6eb8W9Q=; b=LTH9I/KL9LozJkXLRVOVu3EHxVcgaH3RNSk9sDE4iTD5ZFluYJOO2OTx6saT4BOzue GieB8HIUmb9HRNwm7wdRthJAboDTgDwqUKxHRk/bp6q1LE1A8CS0ggrE8wL8107dwoHf AVcyKyHzg34AIlPoNAY6qaMuBY1GZgewagH+ESb0qidt+eJV28yZ/4l9KKEp3RabcHYg xPf8J3Mq5ntWEKW+8XsJq+nSbWKj4ZeGFFvUWhTlImqj2FXDwAhivKovaQ8VyY8oPI9q zAvuVfaOq04IZfzUdvqMxh7w0l7FPFBIeltHZjCZAYbT2itHWGjBEHWE0C6Ov1egkW+X 0ZwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706616680; x=1707221480; 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=BKw4sa3FTLYF2rhnjQmhSXdN1b9XclNq5ftM6eb8W9Q=; b=PeEg+sSjixyOxl9GKvcbssTYJnbrzj7qsHA86e2+mYNj+curIdFx6qHG3YVseOzNup 56uA40iW6gyIw/DURvR0lj3PKNRsY5u6e6DAYcdKRWpluKaI0LD8RQGCigWbiSns9WXj k9+XnlDAAdVZMtFnb0c/A3RVPOXzCcsjkQenPro8glW48KVhJoW46+GKbzOBM1AWDQU6 hBTcXXMO5olAZXOjO8TDWRW86udUiIqLbpDc/Slllh/782xJE2g4+FBDrIBGdXjV90nG bylSoN1uzP9+VBF6NqKuW5teVP56zwE0jamsaaNtNMDFT1hCqN2EQepLUPNU0rSiJ6L9 HiGw== X-Gm-Message-State: AOJu0YxfoiLq4Q1fzBZMxKSSgFEzZD1GW3pYxFB4ameBznVqpfJZbs8K 0A9uVi1JflFKJPKLhdubUhorSklK9cYr8ygMhyxddc7xUcwQJyXk+zdrqerdAkAjEi6ywwhCD2a ITw== X-Received: by 2002:adf:f2c2:0:b0:337:7b14:d9fc with SMTP id d2-20020adff2c2000000b003377b14d9fcmr6410169wrp.12.1706616680671; Tue, 30 Jan 2024 04:11:20 -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.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 04:11:19 -0800 (PST) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Arthur Cohen <arthur.cohen@embecosm.com> Subject: [COMMITTED 040/101] gccrs: toplevel: Add comment about running the collector twice Date: Tue, 30 Jan 2024 13:06:56 +0100 Message-ID: <20240130121026.807464-43-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.1 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: 1789518407454387671 X-GMAIL-MSGID: 1789518407454387671 |
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:06 p.m. UTC
From: Arthur Cohen <arthur.cohen@embecosm.com>
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc
(TopLevel::insert_or_error_out): Add documentation comment.
(TopLevel::go): Likewise.
---
gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc index fbded3e49e1..b9d0bc7c0ac 100644 --- a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc +++ b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc @@ -43,6 +43,9 @@ TopLevel::insert_or_error_out (const Identifier &identifier, const T &node, if (!result) { + // can we do something like check if the node id is the same? if it is the + // same, it's not an error, just the resolver running multiple times? + rich_location rich_loc (line_table, loc); rich_loc.add_range (node_locations[result.error ().existing]); @@ -54,6 +57,11 @@ TopLevel::insert_or_error_out (const Identifier &identifier, const T &node, void TopLevel::go (AST::Crate &crate) { + // we do not include builtin types in the top-level definition collector, as + // they are not used until `Late`. furthermore, we run this visitor multiple + // times in a row in a fixed-point fashion, so it would make the code + // responsible for this ugly and perfom a lot of error checking. + for (auto &item : crate.items) item->accept_vis (*this); }