aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2023-07-10 20:15:19 -0400
committerPhilip Herron <philip.herron@embecosm.com>2023-07-29 16:03:44 +0000
commit611457431b37f8902e6947c3b7845256ad5d5302 (patch)
tree0cf12a9b7fd9edd9d36b4db0e9e2c309c4286dbd /gcc/rust/resolve
parent69f6bc9c913b00758ba66c4f9495caf720941875 (diff)
downloadgcc-611457431b37f8902e6947c3b7845256ad5d5302.zip
gcc-611457431b37f8902e6947c3b7845256ad5d5302.tar.gz
gcc-611457431b37f8902e6947c3b7845256ad5d5302.tar.bz2
Remove Location typedef
gcc/rust/ChangeLog: * rust-location.h (typedef Location): Remove. * expand/rust-proc-macro.cc (register_callback): Replace Location constructor with UNDEF_LOCATION. * ast/rust-ast-collector.h: Replace Location with location_t. * checks/errors/privacy/rust-privacy-reporter.cc: Likewise. * checks/errors/privacy/rust-privacy-reporter.h: Likewise. * checks/errors/privacy/rust-pub-restricted-visitor.cc: Likewise. * checks/errors/privacy/rust-pub-restricted-visitor.h: Likewise. * checks/errors/rust-feature-gate.cc: Likewise. * checks/errors/rust-feature-gate.h: Likewise. * metadata/rust-imports.h: Likewise. * resolve/rust-ast-resolve-path.h: Likewise. * resolve/rust-name-resolver.h: Likewise. * rust-backend.h: Likewise. * rust-diagnostics.h: Likewise. * rust-gcc.cc: Likewise. * rust-linemap.h: Likewise. * util/rust-attributes.cc: Likewise. * util/rust-hir-map.cc: Likewise. * util/rust-hir-map.h: Likewise. * util/rust-token-converter.cc: Likewise. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/resolve')
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-path.h2
-rw-r--r--gcc/rust/resolve/rust-name-resolver.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-path.h b/gcc/rust/resolve/rust-ast-resolve-path.h
index c6d2e1a..0f3af46 100644
--- a/gcc/rust/resolve/rust-ast-resolve-path.h
+++ b/gcc/rust/resolve/rust-ast-resolve-path.h
@@ -43,7 +43,7 @@ private:
void
resolve_simple_path_segments (CanonicalPath prefix, size_t offs,
const std::vector<AST::SimplePathSegment> &segs,
- NodeId expr_node_id, Location expr_locus);
+ NodeId expr_node_id, location_t expr_locus);
};
} // namespace Resolver
diff --git a/gcc/rust/resolve/rust-name-resolver.h b/gcc/rust/resolve/rust-name-resolver.h
index e295c65..67a1d28 100644
--- a/gcc/rust/resolve/rust-name-resolver.h
+++ b/gcc/rust/resolve/rust-name-resolver.h
@@ -71,14 +71,14 @@ public:
CrateNum get_crate_num () const { return crate_num; }
NodeId get_node_id () const { return node_id; }
- std::map<NodeId, Location> &get_declarations () { return decls_within_rib; }
+ std::map<NodeId, location_t> &get_declarations () { return decls_within_rib; }
private:
CrateNum crate_num;
NodeId node_id;
std::map<CanonicalPath, NodeId> path_mappings;
std::map<NodeId, CanonicalPath> reverse_path_mappings;
- std::map<NodeId, Location> decls_within_rib;
+ std::map<NodeId, location_t> decls_within_rib;
std::map<NodeId, std::set<NodeId>> references;
std::map<NodeId, ItemType> decl_type_mappings;
};