From: Jakub Dupak Date: Tue, 15 Nov 2022 14:49:05 +0000 (+0100) Subject: gccrs: ast: Dump trait object type X-Git-Tag: upstream/13.1.0~1008 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ed4a0ebc1d1cad10dc879e5ad8ac0fa0f647e9f;p=platform%2Fupstream%2Fgcc.git 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 --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index 1d593d4..0ae57fd 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