Constants could not be resolved without their identifier in the right
scope.
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Add
constant identifiers to the resolver.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
void
TopLevel::visit (AST::ConstantItem &const_item)
{
+ insert_or_error_out (const_item.get_identifier (), const_item,
+ Namespace::Values);
+
auto expr_vis
= [this, &const_item] () { const_item.get_expr ().accept_vis (*this); };