From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id C777038493D4 for ; Tue, 21 Feb 2023 12:04:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C777038493D4 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-wr1-x432.google.com with SMTP id 6so3759156wrb.11 for ; Tue, 21 Feb 2023 04:04:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; 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=qPwKG1dft3w8VI1Iipv7tGcsWBo3Z5xgOHXhl2kP86Y=; b=LnYazIRVrhjREPhCy5UysqGYNTRyBFiF1xvv+bY4PJHfxPekcZiWEyPab0GdaEndOY qw226I6l5LUuIZimXkPDDqzcta23KXumZOpv8pjmESMIJMsatIDZhgE8BnzApABf+ABK f5/JEHYe3Hyx4gBh3LoZ+Rhk/MNrvQdcKeoR38Mj+q0GcMQsFBglDaWqd/KX2rCdizCV O0AW1xh2vTjievOjtEZg4r17Olz9HcLprV3+nKS+8Xo+rjH6urqIw0tDT+99mMJLRNix 8rPcGNs225ExN3qmJmAW/52EmAr2YSThPIPSRIngj6GnCTBTtxScHDIFo2uC054Wo9Jo DrMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=qPwKG1dft3w8VI1Iipv7tGcsWBo3Z5xgOHXhl2kP86Y=; b=xxz/dgTLSY1rOiO234pZB9GUl1QWU7N/4nXftEZHwP0c+j6yYMXHOaXXbMk7YPlHTC YgStY92iv24bjqi8kS6lFbxtyjWO2QpMbKgE+Eb/drC6c21MYn9nMSPuQOzSP1tMZXFO Eh0sJW0cF6JSbz3zv/bsm+ymzyAbJXIcBT1tM5JHAvbfsa1tumXPpkSBEn4myu5Xvwd4 Vbv+fRYgWNsE/A4tyohXpUgxftPwtHHKrxZ4euvuaXrphzj2+mEgO/94FyFjSA/4HLGh sxrOWe798wp6DUnWDYz/MKUiEtShSPTElkWPwRUj02GWfY1pkY7LUr1dvMFkBGlMTMR+ ttsA== X-Gm-Message-State: AO0yUKV0pS23aFmQIreMK0GqIfepWleb0xsfFBh/xz0avk88RxLz+A8Z T8rhf9afePG2Uzq/y3aS02S0 X-Google-Smtp-Source: AK7set9VhMKJU/euGv+tZ+eDLBIG30tV8A2d5PTrg8fKRq/PTHRFgGFUZ+YsWOn/r+yf7Rvi+W5qNA== X-Received: by 2002:a5d:58ce:0:b0:2c5:56f7:51eb with SMTP id o14-20020a5d58ce000000b002c556f751ebmr3545722wrf.63.1676981065375; Tue, 21 Feb 2023 04:04:25 -0800 (PST) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id c15-20020adffb4f000000b002c55b0e6ef1sm5013811wrs.4.2023.02.21.04.04.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 04:04:24 -0800 (PST) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Jakub Dupak Subject: [committed 075/103] gccrs: ast: Dump array type Date: Tue, 21 Feb 2023 13:02:05 +0100 Message-Id: <20230221120230.596966-76-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230221120230.596966-1-arthur.cohen@embecosm.com> References: <20230221120230.596966-1-arthur.cohen@embecosm.com> Reply-To: arthur.cohen@embecosm.com MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.7 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 List-Id: From: Jakub Dupak gcc/rust/ChangeLog: * ast/rust-ast-dump.cc (Dump::visit): Add missing array visitor Signed-off-by: Jakub Dupak --- gcc/rust/ast/rust-ast-dump.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index b017c6ea592..9f73d0565ac 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -1600,7 +1600,14 @@ Dump::visit (ReferenceType &type) void Dump::visit (ArrayType &type) { + // Syntax: + // [ Type ; Expression ] + + stream << '['; visit (type.get_elem_type ()); + stream << "; "; + visit(type.get_size_expr()); + stream << ']'; } void -- 2.39.1