Derive attributes should be parsed before attempting to retrieve any
traits. This will convert the tokenstream to a list of path if this
hasn't been done previously.
gcc/rust/ChangeLog:
* ast/rust-ast.cc (Attribute::get_traits_to_derive): Convert
tokenstream to path list.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
std::vector<std::reference_wrapper<AST::SimplePath>>
Attribute::get_traits_to_derive ()
{
+ rust_assert (this->is_derive ());
+
+ this->parse_attr_to_meta_item ();
std::vector<std::reference_wrapper<AST::SimplePath>> result;
auto &input = get_attr_input ();
switch (input.get_attr_input_type ())