gcc/rust/ChangeLog:
* ast/rust-item.h: Add non-const `get_visibility` to ExternalTypeItem.
* ast/rust-ast-dump.cc (Dump::visit): Add implementation for ExternalTypeItem.
* expand/rust-attribute-visitor.cc (AttrVisitor::visit): Likewise.
void
Dump::visit (ExternalTypeItem &type)
-{}
+{
+ visit (type.get_visibility ());
+
+ stream << "type " << type.get_identifier () << ';';
+}
void
Dump::visit (ExternalStaticItem &)
Identifier get_identifier () const { return item_name; }
+ Visibility &get_visibility () { return visibility; }
const Visibility &get_visibility () const { return visibility; }
protected:
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