From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7905) id 924EA384FB6D; Tue, 21 Feb 2023 12:02:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 924EA384FB6D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676980937; bh=oyXnn4EscMH+/Ry3zmIKdinNPVJRCQQOeH3X/3mXhIs=; h=From:To:Subject:Date:From; b=JkfeqTtMeg5GCKED+vVdR/J69H9iKNIX3o89uFtOKTSBht7lNi92jySF0o2RKpXQ8 x3k/zX40wVZd1xYHvP5R9w334VmY4HdFuqJC1NrVt7EzanxTTb606WR3BC+evJvvXp wJe6Qlj4yn4/p3plGVgFackXcSFgxVnJyuN0YhoE= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Arthur Cohen To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-6236] gccrs: ast: Dump trait object type X-Act-Checkin: gcc X-Git-Author: Jakub Dupak X-Git-Refname: refs/heads/master X-Git-Oldrev: 638f65b20832751c8f32e7bac8411fb7cd2ac60f X-Git-Newrev: 7ed4a0ebc1d1cad10dc879e5ad8ac0fa0f647e9f Message-Id: <20230221120217.924EA384FB6D@sourceware.org> Date: Tue, 21 Feb 2023 12:02:17 +0000 (GMT) List-Id: https://gcc.gnu.org/g:7ed4a0ebc1d1cad10dc879e5ad8ac0fa0f647e9f commit r13-6236-g7ed4a0ebc1d1cad10dc879e5ad8ac0fa0f647e9f Author: Jakub Dupak Date: Tue Nov 15 15:49:05 2022 +0100 gccrs: ast: Dump trait object type gcc/rust/ChangeLog: * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor. Signed-off-by: Jakub Dupak Diff: --- 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