diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/ast/rust-ast-dump.cc | 6 | ||||
-rw-r--r-- | gcc/rust/ast/rust-item.h | 1 | ||||
-rw-r--r-- | gcc/rust/expand/rust-attribute-visitor.cc | 9 |
3 files changed, 14 insertions, 2 deletions
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index 1fd312a..1cfcebb 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -1434,7 +1434,11 @@ Dump::visit (TraitImpl &impl) void Dump::visit (ExternalTypeItem &type) -{} +{ + visit (type.get_visibility ()); + + stream << "type " << type.get_identifier () << ';'; +} void Dump::visit (ExternalStaticItem &) diff --git a/gcc/rust/ast/rust-item.h b/gcc/rust/ast/rust-item.h index 4be4ca1..ab7d323 100644 --- a/gcc/rust/ast/rust-item.h +++ b/gcc/rust/ast/rust-item.h @@ -3971,6 +3971,7 @@ public: Identifier get_identifier () const { return item_name; } + Visibility &get_visibility () { return visibility; } const Visibility &get_visibility () const { return visibility; } protected: diff --git a/gcc/rust/expand/rust-attribute-visitor.cc b/gcc/rust/expand/rust-attribute-visitor.cc index a5aa8f0..ce93986 100644 --- a/gcc/rust/expand/rust-attribute-visitor.cc +++ b/gcc/rust/expand/rust-attribute-visitor.cc @@ -2738,7 +2738,14 @@ AttrVisitor::visit (AST::TraitImpl &impl) void AttrVisitor::visit (AST::ExternalTypeItem &item) { - // TODO: ARTHUR + expander.expand_cfg_attrs (item.get_outer_attrs ()); + + if (expander.fails_cfg_with_expand (item.get_outer_attrs ())) + item.mark_for_strip (); + + // TODO: Can we do anything like expand a macro here? + // extern "C" { type ffi_ty!(); } + // ? } void |