diff options
author | Jakub Dupak <dev@jakubdupak.com> | 2022-11-15 15:49:05 +0100 |
---|---|---|
committer | Jakub Dupak <dev@jakubdupak.com> | 2022-11-16 17:59:35 +0100 |
commit | 0e026b6c33d20a7d1b8714df73e9157ede98af70 (patch) | |
tree | e2aaeb9e631b6f858182a6bee999f087b76f3272 /gcc | |
parent | 9147e08003b935e312437ec61e83120c8eceb74b (diff) | |
download | gcc-0e026b6c33d20a7d1b8714df73e9157ede98af70.zip gcc-0e026b6c33d20a7d1b8714df73e9157ede98af70.tar.gz gcc-0e026b6c33d20a7d1b8714df73e9157ede98af70.tar.bz2 |
ast: Dump trait object type
Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/ast/rust-ast-dump.cc | 17 |
1 files changed, 13 insertions, 4 deletions
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 |