From patchwork Thu Aug 1 14:57:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Cohen X-Patchwork-Id: 95021 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 60D803861034 for ; Thu, 1 Aug 2024 15:25:24 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id 82977386100A for ; Thu, 1 Aug 2024 14:59:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 82977386100A 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 82977386100A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::536 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722524446; cv=none; b=TcQQHOmIeGLpygsMniaowHlZmN1+IxUc4w81OCgCOCy1Gf2qWWxlpNwr64xG5Okv6G8VkL6ZhmM12L1/6fWOQzeiFX3EY9FMNvDiuCou6ITQ004nC3kE4+9nyoqVJYIiaJBYr8zTp33EkwEwIdzNoNi7Q2xcEvAEOYG2slObaTk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722524446; c=relaxed/simple; bh=52YD4vB8pXIVK7jNqIFtgLPnpffYL8m5Oq7Z7tby2fE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=qAAv2xBqxg/Kj3jhQIPq4keFZTZdmLiF3U/J3A/lTZOX7QUeHjxtyRlPI53Zgrv+oLfy7I3e49F00tssZu3ICuvGI2WEaF4BaBuwftC8ELAkIDvIhdbCdfk4EZvVfvbVHLSViam6hoF3C+orp3wLZp3O33OLbxp1VGVhZCMS/t8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5b01af9b0c9so6167613a12.3 for ; Thu, 01 Aug 2024 07:59:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1722524390; x=1723129190; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=azFEAynS8Agc4MNl8P4CxkakBvycfgELmQaA7hkqHrE=; b=QDpJSnirXsqxsvKrq2LEVH8U3kDNQu2ileSnMLyY56JPZWyk0mOSQD0NdUK/BwcPHm 29C4FXcRj6VuL0BDwqCdTY/bWxgaDfpfS3fDOozTOBl+Ji6y+Tk8HaiylYjDycyckq6J NfvlY2hXFScH6rnGTQVq47L9sjZxJQf3Gnx6t4XisO3WRJO73K2/uZvpG53DogRHeLXK SXKo7kd35QutCefifPAqwQMLfcjK7JHoJ2khpdgpDd589VNzLPVPonBuGIxYnFNcJ/pw 2CNhWg8T1mAToNzyqCLBzREqyJNVlzu90fQxN45cWsajwpRlax3bXLfmO9M0WTgGAx+c +xrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722524390; x=1723129190; h=content-transfer-encoding:mime-version: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=azFEAynS8Agc4MNl8P4CxkakBvycfgELmQaA7hkqHrE=; b=B+pEWxXKBlhCHURQkVnQO6LzmSQyoJR/4mcimLakhrgfjsjZf4KuXm8CStSvXFV6YK MYduag0IfqArSHnoza9RIlo3Y/8HWqZYEFvlr8/Gh5D1DdrUXf50fi9VOsbC/TdWrtzz xoxEiR6aQq5yuuNvNJvOsmJIOsNRMjwmrl8cgDUaQERCVmGEY5Tw6HJh8u2TsYGu9ChM 45qhVck7DZcbBruIEgwGFKSYMj2yisyUjO8L4a5Shjlhucg0/bqUr56h4ZZP/L8MEcSB /joVSd/9NFqs1WI9yOQufjfClWoY0VRE7jEKdWe/urpJWFcPHWRMm7OKy2mUCJAxpQjB KBkA== X-Gm-Message-State: AOJu0Yyq3bDcJbC7bS6viBWOZ0fqRkC8PWC7O7yR99Oi0/JLehi2QITd 8tloMgvFWne/QebyVv5yFTsNmwkXOkCQbyjBFjJq8f6LxD76sEVQMm8vtyPLELGvw/NvKrWZ0Aw T7Tm2 X-Google-Smtp-Source: AGHT+IGeXM2nCHxUMfzrytfu01aTiow9OjJTuqGe+kOjqPlZ23+flcJA48HgcyNR0rVV/46ytK0sFA== X-Received: by 2002:a05:6402:5167:b0:5a3:27bd:e264 with SMTP id 4fb4d7f45d1cf-5b7f3cc7ab3mr449804a12.9.1722524389856; Thu, 01 Aug 2024 07:59:49 -0700 (PDT) Received: from platypus.lan ([2a04:cec2:9:dc84:3622:6733:ff49:ee91]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac63590592sm10252456a12.25.2024.08.01.07.59.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 07:59:49 -0700 (PDT) From: Arthur Cohen To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Pierre-Emmanuel Patry Subject: [PATCH 087/125] gccrs: Change enum namespace from value to type Date: Thu, 1 Aug 2024 16:57:23 +0200 Message-ID: <20240801145809.366388-89-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801145809.366388-2-arthur.cohen@embecosm.com> References: <20240801145809.366388-2-arthur.cohen@embecosm.com> MIME-Version: 1.0 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org From: Pierre-Emmanuel Patry The enum type shall be in type namespace, not value namespace. gcc/rust/ChangeLog: * resolve/rust-toplevel-name-resolver-2.0.cc (GlobbingVisitor::visit): Change enum type namespace. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 820ba271ae0..b672d448151 100644 --- a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc +++ b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc @@ -95,7 +95,7 @@ GlobbingVisitor::visit (AST::Enum &enum_item) { if (enum_item.get_visibility ().is_public ()) ctx.insert_shadowable (enum_item.get_identifier (), - enum_item.get_node_id (), Namespace::Values); + enum_item.get_node_id (), Namespace::Types); } void