From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id A4858382CD5C for ; Tue, 21 Feb 2023 12:04:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A4858382CD5C 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-wm1-x332.google.com with SMTP id p18-20020a05600c359200b003dc57ea0dfeso3357672wmq.0 for ; Tue, 21 Feb 2023 04:04:33 -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=3rXwqVcU6PweinMQaeTHlbgL76U7nK1bDRHb738wDlU=; b=DbQ795UvI/gfLjUAUB36HXtc5zCvYFUCQX5GS6UhmiVbeu5rcFIC7izZC0+RvJlJh5 Mts8f72iCYLrClRj7kKzVcAVypRUg7Qb/u2Wy/O/MCNi9KhUBRI2swnJ34qX17nZANgO YiyAnqGVXIYJED9HFInmrbj/2komgtqZeM4LKiUqsdeT04cF/SRDR/lImFmXR09lSKBX kTrfNT2x3fBEii9yzfB4FkRw2Yj1ajhdOIax3pdvCpsm3XWTdqm3liSLZlpCH1m+YGuY n/Va8e7GoneAtFO+eNbhav/yBcsbP6TMihkWZVJ5dJNlLVlG2w1bMqnB5nYTdo5io4F9 Qqzw== 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=3rXwqVcU6PweinMQaeTHlbgL76U7nK1bDRHb738wDlU=; b=iG6E4lqieh8Vn3LHX8yEjbUfO80Bn+t/DHIxInDce1fasAsY2DhNPZvhPxcAo/rQCp m09vrVM5fiG6cIYsWj70kn8/DGnRwbERG3cplQqPT4cRZwoVUdLqYSPutSDM9DdGsf8l jps+1MyJMo0yr+rjBBUa2FvY/rpDwb7TNl6WdvgKH3ZxY516SuxJeCrdBGaS7jIiJU+6 NNefQNkqi4veWobOc0YX/SDC5EIWa3YeVF9Jh7DHCVxH3EJ27H0WnWn6MxZ8lvuAUYSO zhgIcZ/JPhSYtm5iF/CBBIyVse6qX9MCdt8pNNfkjrLrKUycwpkqb7JJPqWHBblWZdv0 UZog== X-Gm-Message-State: AO0yUKWBG8irF42IxzvooCvXB9exb7iEFu516JYewo7B9pSBhCAUGA0c A6mjnjgP5WAmVPSXl/M75bs7fdXGc+Of7juUEw== X-Google-Smtp-Source: AK7set8UhxB+xdcE0PrUjdSTAu9Y8EhfBPIfYvc5H1pGUGQzQGF3tCxU/C6ENrkmUdn8zmjLQRfNLQ== X-Received: by 2002:a05:600c:2e93:b0:3e1:f8af:8ef1 with SMTP id p19-20020a05600c2e9300b003e1f8af8ef1mr2762643wmn.22.1676981072505; Tue, 21 Feb 2023 04:04:32 -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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 04:04:32 -0800 (PST) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Jakub Dupak Subject: [committed 086/103] gccrs: ast: Dump type param type Date: Tue, 21 Feb 2023 13:02:16 +0100 Message-Id: <20230221120230.596966-87-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.8 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 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index 7d62571b778..216f0a43dc3 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -892,7 +892,19 @@ Dump::visit (AsyncBlockExpr &) void Dump::visit (TypeParam ¶m) { + // Syntax: + // IDENTIFIER( : TypeParamBounds? )? ( = Type )? + // TypeParamBounds : + // TypeParamBound ( + TypeParamBound )* +? + + // FIXME this outputs things like "Ambiguous: String" - this comes from + // Token::str stream << param.get_type_representation (); + if (param.has_type_param_bounds ()) + { + stream << ": "; + visit_items_joined_by_separator (param.get_type_param_bounds (), " + "); + } if (param.has_type ()) { stream << " = "; @@ -1663,7 +1675,7 @@ Dump::visit (TraitObjectTypeOneBound &type) if (type.is_dyn ()) stream << "dyn "; - visit(type.get_trait_bound()); + visit (type.get_trait_bound ()); } void -- 2.39.1