From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id DF0353881D18 for ; Tue, 21 Feb 2023 12:04:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DF0353881D18 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-x431.google.com with SMTP id z8so3885536wrm.8 for ; Tue, 21 Feb 2023 04:04:30 -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=h/qxXb9N6bCVFSsK37WzwVzLis52VTRBgIBGk8Rh1AI=; b=R2pp5/BR5fKno7bEWSPPVxh9r2CJUU7GGR/YvZOWvQwHdj6s1IfRastGwBWUwf9AjH cr+MCqZ689hrKNbgA3yXzVT4lJX7ctZoQdUt4Dl//x7k86STbDfV3j5m8GoMk1YxQHfQ y+YNRLRf1Wlt+f7JtiVPq2orAVTbejDcf5eVmMm4rc1h0ZKPEOJXxJj0TyG6yGMYDuac J0mR4gunDa1iEkCjKAxRYwFsD3Ron8VXjG8PGNBcBxzXjChYQl57BUd4JR57LRJJ/5oP MnmXdECy5MPXnYqQewG7o7LZrfCXhI1UiyEhqCgHchvT/AJ1hfS54S/KGOYwyK+e+r4u 5bbw== 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=h/qxXb9N6bCVFSsK37WzwVzLis52VTRBgIBGk8Rh1AI=; b=zTdUvpdRoJNzbS4Q0hhMHSx5C7S80cglo3Fhwac3+wTEI/9acYnbcb/evX/a/fNH41 z/87pmkZw+ySSOb5S/cwTTAOz6YL7RAii/sXny+zUNNk22epWuLilecCYSK/Op0ya4qS v/aeSGorUBQl235YbZIKJe5mZwk6KZ5kVE9ybgMVBNpVrI+3/Wl7aCmmfQiCnxim8fr5 ZP/v8DinDJeU4iCxbbuR+VvikJBM8eufJ1m/d0vi0kCUwyJSBRC7yJ1aDHoxdxBG6r+V v/TQ0SeK/XJIpQwml5pGccRR/PrMJyXi2Uzhf00Xt9TCUeAWk83ZjYkzrLPwuwPKCjhq g++A== X-Gm-Message-State: AO0yUKXvWtTUKi3QQwmf+hbhcb2P8OB9L12TX7KgXV+Ct8+/+7FtK3dt 6MHVV+FvEdebUNGa0ZCJZgen X-Google-Smtp-Source: AK7set8q0cKI+/rByuVGb2Xq+8uQJaGk9Qc1OlRA+x2oXMoDwUIq7TxReBabH1+WMbUJbpY+Ys4OfQ== X-Received: by 2002:adf:de04:0:b0:2c5:56f7:51f0 with SMTP id b4-20020adfde04000000b002c556f751f0mr2459058wrm.49.1676981070463; Tue, 21 Feb 2023 04:04:30 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 04:04:30 -0800 (PST) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Jakub Dupak Subject: [committed 083/103] gccrs: ast: Dump trait object type Date: Tue, 21 Feb 2023 13:02:13 +0100 Message-Id: <20230221120230.596966-84-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 visitor. Signed-off-by: Jakub Dupak --- gcc/rust/ast/rust-ast-dump.cc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index 1d593d4b749..0ae57fdb744 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -1618,12 +1618,21 @@ Dump::visit (ImplTraitType &type) // TypeParamBound ( + TypeParamBound )* +? stream << "impl "; - visit_items_joined_by_separator(type.get_type_param_bounds (), " + "); + visit_items_joined_by_separator (type.get_type_param_bounds (), " + "); } void -Dump::visit (TraitObjectType &) -{} +Dump::visit (TraitObjectType &type) +{ + // Syntax: + // dyn? TypeParamBounds + // TypeParamBounds : + // TypeParamBound ( + TypeParamBound )* +? + + if (type.is_dyn ()) + stream << "dyn "; + visit_items_joined_by_separator (type.get_type_param_bounds (), " + "); +} void Dump::visit (ParenthesisedType &) @@ -1636,7 +1645,7 @@ Dump::visit (ImplTraitTypeOneBound &type) // impl TraitBound stream << "impl "; - visit (type.get_trait_bound()); + visit (type.get_trait_bound ()); } void -- 2.39.1