aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2023-07-10 15:42:49 -0400
committerPhilip Herron <philip.herron@embecosm.com>2023-07-17 11:17:14 +0000
commit9cf8b77a3ef0ffcea40d13295938f7bda91985f9 (patch)
tree8ff0497560bfb1bf5a0c9b1deaaff7015b3ece72 /gcc/rust/resolve
parentb7c8f5a33bace9186a151cb6281e15afae176b94 (diff)
downloadgcc-9cf8b77a3ef0ffcea40d13295938f7bda91985f9.zip
gcc-9cf8b77a3ef0ffcea40d13295938f7bda91985f9.tar.gz
gcc-9cf8b77a3ef0ffcea40d13295938f7bda91985f9.tar.bz2
Replace some usages of Location with location_t
gcc/rust/ChangeLog: * ast/rust-ast-collector.cc: Replace Location with location_t. * ast/rust-ast.cc: Likewise. * ast/rust-ast.h: Likewise. * ast/rust-expr.h: Likewise. * ast/rust-item.h: Likewise. * ast/rust-macro.h: Likewise. * ast/rust-path.cc: Likewise. * ast/rust-path.h: Likewise. * ast/rust-pattern.h: Likewise. * ast/rust-stmt.h: Likewise. * ast/rust-type.h: Likewise. * backend/rust-compile-base.cc: Likewise. * backend/rust-compile-base.h: Likewise. * backend/rust-compile-block.cc: Likewise. * backend/rust-compile-expr.cc: Likewise. * backend/rust-compile-expr.h: Likewise. * backend/rust-compile-fnparam.cc: Likewise. * backend/rust-compile-fnparam.h: Likewise. * backend/rust-compile-intrinsic.cc: Likewise. * backend/rust-compile-pattern.cc: Likewise. * backend/rust-compile-resolve-path.h: Likewise. * backend/rust-compile.cc: Likewise. * checks/errors/rust-const-checker.cc: Likewise. * checks/errors/rust-const-checker.h: Likewise. * checks/errors/rust-unsafe-checker.cc: Likewise. * checks/errors/rust-unsafe-checker.h: Likewise. * expand/rust-macro-builtins.cc: Likewise. * expand/rust-macro-expand.h: Likewise. * hir/rust-ast-lower-base.h: Likewise. * hir/rust-ast-lower-implitem.h: Likewise. * hir/rust-ast-lower-item.cc: Likewise. * hir/tree/rust-hir-expr.h: Likewise. * hir/tree/rust-hir-item.h: Likewise. * hir/tree/rust-hir-path.h: Likewise. * hir/tree/rust-hir-pattern.h: Likewise. * hir/tree/rust-hir-stmt.h: Likewise. * hir/tree/rust-hir-type.h: Likewise. * hir/tree/rust-hir.cc: Likewise. * hir/tree/rust-hir.h: Likewise. * lex/rust-token.h: Likewise. * metadata/rust-extern-crate.cc: Likewise. * metadata/rust-extern-crate.h: Likewise. * parse/rust-parse-impl.h: Likewise. * parse/rust-parse.h: Likewise. * resolve/rust-ast-resolve-expr.cc: Likewise. * resolve/rust-ast-resolve-implitem.h: Likewise. * resolve/rust-ast-resolve-pattern.h: Likewise. * resolve/rust-ast-resolve-stmt.h: Likewise. * resolve/rust-ast-resolve-toplevel.h: Likewise. * resolve/rust-ast-resolve-type.h: Likewise. * resolve/rust-name-resolver.cc: Likewise. * resolve/rust-name-resolver.h: Likewise. * rust-diagnostics.cc: Likewise. * rust-diagnostics.h: Likewise. * rust-gcc.cc: Likewise. * rust-session-manager.cc: Likewise. * rust-session-manager.h: Likewise. * typecheck/rust-casts.cc: Likewise. * typecheck/rust-casts.h: Likewise. * typecheck/rust-coercion.cc: Likewise. * typecheck/rust-coercion.h: Likewise. * typecheck/rust-hir-path-probe.cc: Likewise. * typecheck/rust-hir-path-probe.h: Likewise. * typecheck/rust-hir-trait-reference.cc: Likewise. * typecheck/rust-hir-trait-reference.h: Likewise. * typecheck/rust-hir-trait-resolve.cc: Likewise. * typecheck/rust-hir-type-check-base.cc: Likewise. * typecheck/rust-hir-type-check-base.h: Likewise. * typecheck/rust-hir-type-check-item.cc: Likewise. * typecheck/rust-hir-type-check-item.h: Likewise. * typecheck/rust-hir-type-check-path.cc: Likewise. * typecheck/rust-hir-type-check-pattern.cc: Likewise. * typecheck/rust-hir-type-check-pattern.h: Likewise. * typecheck/rust-hir-type-check-type.cc: Likewise. * typecheck/rust-hir-type-check-type.h: Likewise. * typecheck/rust-hir-type-check.cc: Likewise. * typecheck/rust-hir-type-check.h: Likewise. * typecheck/rust-substitution-mapper.cc: Likewise. * typecheck/rust-substitution-mapper.h: Likewise. * typecheck/rust-type-util.cc: Likewise. * typecheck/rust-typecheck-context.cc: Likewise. * typecheck/rust-tyty-bounds.cc: Likewise. * typecheck/rust-tyty-call.h: Likewise. * typecheck/rust-tyty-subst.cc: Likewise. * typecheck/rust-tyty-subst.h: Likewise. * typecheck/rust-tyty-util.cc: Likewise. * typecheck/rust-tyty-util.h: Likewise. * typecheck/rust-tyty.cc: Likewise. * typecheck/rust-tyty.h: Likewise. * typecheck/rust-unify.cc: Likewise. * typecheck/rust-unify.h: Likewise. * util/rust-hir-map.cc: Likewise. * util/rust-hir-map.h: Likewise. * util/rust-identifier.h: 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-expr.cc6
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-implitem.h20
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-pattern.h4
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-stmt.h20
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-toplevel.h32
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-type.h2
-rw-r--r--gcc/rust/resolve/rust-name-resolver.cc6
-rw-r--r--gcc/rust/resolve/rust-name-resolver.h6
8 files changed, 48 insertions, 48 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-expr.cc b/gcc/rust/resolve/rust-ast-resolve-expr.cc
index 9c790e8..3e264c3 100644
--- a/gcc/rust/resolve/rust-ast-resolve-expr.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-expr.cc
@@ -424,7 +424,7 @@ ResolveExpr::visit (AST::LoopExpr &expr)
resolver->get_label_scope ().insert (
CanonicalPath::new_seg (expr.get_node_id (), label_name),
label_lifetime_node_id, label.get_locus (), false, Rib::ItemType::Label,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rust_error_at (label.get_locus (), "label redefined multiple times");
rust_error_at (locus, "was defined here");
});
@@ -498,7 +498,7 @@ ResolveExpr::visit (AST::WhileLoopExpr &expr)
resolver->get_label_scope ().insert (
CanonicalPath::new_seg (label.get_node_id (), label_name),
label_lifetime_node_id, label.get_locus (), false, Rib::ItemType::Label,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rust_error_at (label.get_locus (), "label redefined multiple times");
rust_error_at (locus, "was defined here");
});
@@ -527,7 +527,7 @@ ResolveExpr::visit (AST::ForLoopExpr &expr)
resolver->get_label_scope ().insert (
CanonicalPath::new_seg (label.get_node_id (), label_name),
label_lifetime_node_id, label.get_locus (), false, Rib::ItemType::Label,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rust_error_at (label.get_locus (), "label redefined multiple times");
rust_error_at (locus, "was defined here");
});
diff --git a/gcc/rust/resolve/rust-ast-resolve-implitem.h b/gcc/rust/resolve/rust-ast-resolve-implitem.h
index f8cbdae..9a34aa8 100644
--- a/gcc/rust/resolve/rust-ast-resolve-implitem.h
+++ b/gcc/rust/resolve/rust-ast-resolve-implitem.h
@@ -57,7 +57,7 @@ public:
resolver->get_type_scope ().insert (
path, type.get_node_id (), type.get_locus (), false, Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, type.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -73,7 +73,7 @@ public:
resolver->get_name_scope ().insert (
path, constant.get_node_id (), constant.get_locus (), false,
Rib::ItemType::Const,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, constant.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -90,7 +90,7 @@ public:
resolver->get_name_scope ().insert (
path, function.get_node_id (), function.get_locus (), false,
Rib::ItemType::Function,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, function.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -106,7 +106,7 @@ public:
resolver->get_name_scope ().insert (
path, method.get_node_id (), method.get_locus (), false,
Rib::ItemType::Function,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, method.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -146,7 +146,7 @@ public:
resolver->get_name_scope ().insert (
path, function.get_node_id (), function.get_locus (), false,
Rib::ItemType::Function,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, function.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -166,7 +166,7 @@ public:
resolver->get_name_scope ().insert (
path, method.get_node_id (), method.get_locus (), false,
Rib::ItemType::Function,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, method.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -186,7 +186,7 @@ public:
resolver->get_name_scope ().insert (
path, constant.get_node_id (), constant.get_locus (), false,
Rib::ItemType::Const,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, constant.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -204,7 +204,7 @@ public:
resolver->get_type_scope ().insert (
path, type.get_node_id (), type.get_locus (), false, Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, type.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -244,7 +244,7 @@ public:
resolver->get_name_scope ().insert (
path, function.get_node_id (), function.get_locus (), false,
Rib::ItemType::Function,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, function.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -263,7 +263,7 @@ public:
resolver->get_name_scope ().insert (
path, item.get_node_id (), item.get_locus (), false,
Rib::ItemType::Static,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, item.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
diff --git a/gcc/rust/resolve/rust-ast-resolve-pattern.h b/gcc/rust/resolve/rust-ast-resolve-pattern.h
index a51182a..1eb95ab 100644
--- a/gcc/rust/resolve/rust-ast-resolve-pattern.h
+++ b/gcc/rust/resolve/rust-ast-resolve-pattern.h
@@ -51,10 +51,10 @@ class BindingTypeInfo
{
Mutability mut;
bool is_ref;
- Location locus;
+ location_t locus;
public:
- BindingTypeInfo (Mutability mut, bool is_ref, Location locus)
+ BindingTypeInfo (Mutability mut, bool is_ref, location_t locus)
: mut (mut), is_ref (is_ref), locus (locus)
{}
diff --git a/gcc/rust/resolve/rust-ast-resolve-stmt.h b/gcc/rust/resolve/rust-ast-resolve-stmt.h
index 641036c..420f75e 100644
--- a/gcc/rust/resolve/rust-ast-resolve-stmt.h
+++ b/gcc/rust/resolve/rust-ast-resolve-stmt.h
@@ -59,7 +59,7 @@ public:
resolver->get_name_scope ().insert (
path, constant.get_node_id (), constant.get_locus (), false,
Rib::ItemType::Const,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, constant.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -94,7 +94,7 @@ public:
resolver->get_type_scope ().insert (
path, struct_decl.get_node_id (), struct_decl.get_locus (), false,
Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, struct_decl.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -127,7 +127,7 @@ public:
resolver->get_type_scope ().insert (
path, enum_decl.get_node_id (), enum_decl.get_locus (), false,
Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, enum_decl.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -159,7 +159,7 @@ public:
resolver->get_type_scope ().insert (
path, item.get_node_id (), item.get_locus (), false, Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, item.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -179,7 +179,7 @@ public:
resolver->get_type_scope ().insert (
path, item.get_node_id (), item.get_locus (), false, Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, item.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -205,7 +205,7 @@ public:
resolver->get_type_scope ().insert (
path, item.get_node_id (), item.get_locus (), false, Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, item.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -231,7 +231,7 @@ public:
resolver->get_type_scope ().insert (
path, item.get_node_id (), item.get_locus (), false, Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, item.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -252,7 +252,7 @@ public:
resolver->get_type_scope ().insert (
path, struct_decl.get_node_id (), struct_decl.get_locus (), false,
Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, struct_decl.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -290,7 +290,7 @@ public:
resolver->get_type_scope ().insert (
path, union_decl.get_node_id (), union_decl.get_locus (), false,
Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, union_decl.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -326,7 +326,7 @@ public:
resolver->get_name_scope ().insert (
path, function.get_node_id (), function.get_locus (), false,
Rib::ItemType::Function,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, function.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
diff --git a/gcc/rust/resolve/rust-ast-resolve-toplevel.h b/gcc/rust/resolve/rust-ast-resolve-toplevel.h
index a245a89..12b7103 100644
--- a/gcc/rust/resolve/rust-ast-resolve-toplevel.h
+++ b/gcc/rust/resolve/rust-ast-resolve-toplevel.h
@@ -55,7 +55,7 @@ public:
resolver->get_name_scope ().insert (
path, module.get_node_id (), module.get_locus (), false,
Rib::ItemType::Module,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, module.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -85,7 +85,7 @@ public:
resolver->get_type_scope ().insert (
path, alias.get_node_id (), alias.get_locus (), false,
Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, alias.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -107,7 +107,7 @@ public:
resolver->get_type_scope ().insert (
path, struct_decl.get_node_id (), struct_decl.get_locus (), false,
Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, struct_decl.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -129,7 +129,7 @@ public:
resolver->get_type_scope ().insert (
path, enum_decl.get_node_id (), enum_decl.get_locus (), false,
Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, enum_decl.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -155,7 +155,7 @@ public:
resolver->get_type_scope ().insert (
path, item.get_node_id (), item.get_locus (), false, Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, item.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -177,7 +177,7 @@ public:
resolver->get_type_scope ().insert (
path, item.get_node_id (), item.get_locus (), false, Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, item.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -199,7 +199,7 @@ public:
resolver->get_type_scope ().insert (
path, item.get_node_id (), item.get_locus (), false, Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, item.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -221,7 +221,7 @@ public:
resolver->get_type_scope ().insert (
path, item.get_node_id (), item.get_locus (), false, Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, item.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -245,7 +245,7 @@ public:
resolver->get_type_scope ().insert (
path, struct_decl.get_node_id (), struct_decl.get_locus (), false,
Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, struct_decl.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -267,7 +267,7 @@ public:
resolver->get_type_scope ().insert (
path, union_decl.get_node_id (), union_decl.get_locus (), false,
Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, union_decl.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -287,7 +287,7 @@ public:
resolver->get_name_scope ().insert (
path, var.get_node_id (), var.get_locus (), false, Rib::ItemType::Static,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, var.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -308,7 +308,7 @@ public:
resolver->get_name_scope ().insert (
path, constant.get_node_id (), constant.get_locus (), false,
Rib::ItemType::Const,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, constant.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -330,7 +330,7 @@ public:
resolver->get_name_scope ().insert (
path, function.get_node_id (), function.get_locus (), false,
Rib::ItemType::Function,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, function.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -374,7 +374,7 @@ public:
resolver->get_name_scope ().insert (
impl_prefix, impl_block.get_node_id (), impl_block.get_locus (), false,
Rib::ItemType::TraitImpl,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, impl_block.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -394,7 +394,7 @@ public:
resolver->get_type_scope ().insert (
path, trait.get_node_id (), trait.get_locus (), false,
Rib::ItemType::Trait,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, trait.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
@@ -470,7 +470,7 @@ public:
resolver->get_type_scope ().insert (
decl, resolved_crate, extern_crate.get_locus (), false,
Rib::ItemType::ExternCrate,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rich_location r (line_table, extern_crate.get_locus ());
r.add_range (locus);
rust_error_at (r, "redefined multiple times");
diff --git a/gcc/rust/resolve/rust-ast-resolve-type.h b/gcc/rust/resolve/rust-ast-resolve-type.h
index ef1ccec..05a9d16 100644
--- a/gcc/rust/resolve/rust-ast-resolve-type.h
+++ b/gcc/rust/resolve/rust-ast-resolve-type.h
@@ -178,7 +178,7 @@ public:
param.get_type_representation ().as_string ());
resolver->get_type_scope ().insert (
seg, param.get_node_id (), param.get_locus (), false, Rib::ItemType::Type,
- [&] (const CanonicalPath &, NodeId, Location locus) -> void {
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
rust_error_at (param.get_locus (),
"generic param redefined multiple times");
rust_error_at (locus, "was defined here");
diff --git a/gcc/rust/resolve/rust-name-resolver.cc b/gcc/rust/resolve/rust-name-resolver.cc
index 7bb123b..067e39b 100644
--- a/gcc/rust/resolve/rust-name-resolver.cc
+++ b/gcc/rust/resolve/rust-name-resolver.cc
@@ -28,7 +28,7 @@ Rib::Rib (CrateNum crateNum, NodeId node_id)
void
Rib::insert_name (
- const CanonicalPath &path, NodeId id, Location locus, bool shadow,
+ const CanonicalPath &path, NodeId id, location_t locus, bool shadow,
ItemType type,
std::function<void (const CanonicalPath &, NodeId, Location)> dup_cb)
{
@@ -139,7 +139,7 @@ Scope::Scope (CrateNum crate_num) : crate_num (crate_num) {}
void
Scope::insert (
- const CanonicalPath &ident, NodeId id, Location locus, bool shadow,
+ const CanonicalPath &ident, NodeId id, location_t locus, bool shadow,
Rib::ItemType type,
std::function<void (const CanonicalPath &, NodeId, Location)> dup_cb)
{
@@ -147,7 +147,7 @@ Scope::insert (
}
void
-Scope::insert (const CanonicalPath &ident, NodeId id, Location locus,
+Scope::insert (const CanonicalPath &ident, NodeId id, location_t locus,
Rib::ItemType type)
{
peek ()->insert_name (ident, id, locus, true, type,
diff --git a/gcc/rust/resolve/rust-name-resolver.h b/gcc/rust/resolve/rust-name-resolver.h
index f38cbb9..8fa3a78 100644
--- a/gcc/rust/resolve/rust-name-resolver.h
+++ b/gcc/rust/resolve/rust-name-resolver.h
@@ -55,7 +55,7 @@ public:
// this takes the relative paths of items within a compilation unit for lookup
void insert_name (
- const CanonicalPath &path, NodeId id, Location locus, bool shadow,
+ const CanonicalPath &path, NodeId id, location_t locus, bool shadow,
ItemType type,
std::function<void (const CanonicalPath &, NodeId, Location)> dup_cb);
@@ -89,11 +89,11 @@ public:
Scope (CrateNum crate_num);
void
- insert (const CanonicalPath &ident, NodeId id, Location locus, bool shadow,
+ 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 locus,
+ void insert (const CanonicalPath &ident, NodeId id, location_t locus,
Rib::ItemType type = Rib::ItemType::Unknown);
bool lookup (const CanonicalPath &ident, NodeId *id);
bool lookup_decl_type (NodeId id, Rib::ItemType *type);