gcc/rust/ChangeLog:
* resolve/rust-name-resolution-context.h: Store a reference to the
mappings.
* resolve/rust-name-resolution-context.cc
(NameResolutionContext::NameResolutionContext): Likewise.
namespace Rust {
namespace Resolver2_0 {
+NameResolutionContext::NameResolutionContext ()
+ : mappings (*Analysis::Mappings::get ())
+{}
+
tl::expected<NodeId, DuplicateNameError>
NameResolutionContext::insert (Identifier name, NodeId id, Namespace ns)
{
#include "optional.h"
#include "rust-forever-stack.h"
+#include "rust-hir-map.h"
namespace Rust {
namespace Resolver2_0 {
class NameResolutionContext
{
public:
+ NameResolutionContext ();
+
/**
* Insert a new value in the current rib.
*
ForeverStack<Namespace::Types> types;
ForeverStack<Namespace::Macros> macros;
ForeverStack<Namespace::Labels> labels;
+
+ Analysis::Mappings &mappings;
};
} // namespace Resolver2_0