aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/resolve')
-rw-r--r--gcc/rust/resolve/rust-name-resolver.cc9
-rw-r--r--gcc/rust/resolve/rust-name-resolver.h10
2 files changed, 10 insertions, 9 deletions
diff --git a/gcc/rust/resolve/rust-name-resolver.cc b/gcc/rust/resolve/rust-name-resolver.cc
index 067e39b..477646c 100644
--- a/gcc/rust/resolve/rust-name-resolver.cc
+++ b/gcc/rust/resolve/rust-name-resolver.cc
@@ -30,7 +30,7 @@ void
Rib::insert_name (
const CanonicalPath &path, NodeId id, location_t locus, bool shadow,
ItemType type,
- std::function<void (const CanonicalPath &, NodeId, Location)> dup_cb)
+ std::function<void (const CanonicalPath &, NodeId, location_t)> dup_cb)
{
auto it = path_mappings.find (path);
bool path_already_exists = it != path_mappings.end ();
@@ -141,7 +141,7 @@ void
Scope::insert (
const CanonicalPath &ident, NodeId id, location_t locus, bool shadow,
Rib::ItemType type,
- std::function<void (const CanonicalPath &, NodeId, Location)> dup_cb)
+ std::function<void (const CanonicalPath &, NodeId, location_t)> dup_cb)
{
peek ()->insert_name (ident, id, locus, shadow, type, dup_cb);
}
@@ -151,7 +151,7 @@ Scope::insert (const CanonicalPath &ident, NodeId id, location_t locus,
Rib::ItemType type)
{
peek ()->insert_name (ident, id, locus, true, type,
- [] (const CanonicalPath &, NodeId, Location) -> void {
+ [] (const CanonicalPath &, NodeId, location_t) -> void {
});
}
@@ -368,7 +368,8 @@ Resolver::insert_builtin_types (Rib *r)
builtin->as_string ());
r->insert_name (builtin_path, builtin->get_node_id (), BUILTINS_LOCATION,
false, Rib::ItemType::Type,
- [] (const CanonicalPath &, NodeId, Location) -> void {});
+ [] (const CanonicalPath &, NodeId, location_t) -> void {
+ });
}
}
diff --git a/gcc/rust/resolve/rust-name-resolver.h b/gcc/rust/resolve/rust-name-resolver.h
index 8fa3a78..e295c65 100644
--- a/gcc/rust/resolve/rust-name-resolver.h
+++ b/gcc/rust/resolve/rust-name-resolver.h
@@ -57,7 +57,7 @@ public:
void insert_name (
const CanonicalPath &path, NodeId id, location_t locus, bool shadow,
ItemType type,
- std::function<void (const CanonicalPath &, NodeId, Location)> dup_cb);
+ std::function<void (const CanonicalPath &, NodeId, location_t)> dup_cb);
bool lookup_canonical_path (const NodeId &id, CanonicalPath *ident);
bool lookup_name (const CanonicalPath &ident, NodeId *id);
@@ -88,10 +88,10 @@ class Scope
public:
Scope (CrateNum crate_num);
- void
- insert (const CanonicalPath &ident, NodeId id, location_t locus, bool shadow,
- Rib::ItemType type,
- std::function<void (const CanonicalPath &, NodeId, Location)> dup_cb);
+ void insert (
+ const CanonicalPath &ident, NodeId id, location_t locus, bool shadow,
+ Rib::ItemType type,
+ std::function<void (const CanonicalPath &, NodeId, location_t)> dup_cb);
void insert (const CanonicalPath &ident, NodeId id, location_t locus,
Rib::ItemType type = Rib::ItemType::Unknown);