aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-06-27 11:40:36 +0100
committerPhilip Herron <philip.herron@embecosm.com>2022-06-27 11:40:36 +0100
commit5cacb0d3cb885c705c603751eb93c1612f036c9a (patch)
treed3bc3e384847134c7dc929972b33de420d8e3886
parent5bab921fc018bfaae00d2739e5c4e5912673823a (diff)
downloadgcc-5cacb0d3cb885c705c603751eb93c1612f036c9a.zip
gcc-5cacb0d3cb885c705c603751eb93c1612f036c9a.tar.gz
gcc-5cacb0d3cb885c705c603751eb93c1612f036c9a.tar.bz2
Remove locus field which can shadow leading to missing location info
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-base.h3
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-pattern.h7
2 files changed, 2 insertions, 8 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-base.h b/gcc/rust/resolve/rust-ast-resolve-base.h
index 4a22a9d..395e710 100644
--- a/gcc/rust/resolve/rust-ast-resolve-base.h
+++ b/gcc/rust/resolve/rust-ast-resolve-base.h
@@ -202,7 +202,7 @@ public:
protected:
ResolverBase (NodeId parent)
: resolver (Resolver::get ()), mappings (Analysis::Mappings::get ()),
- resolved_node (UNKNOWN_NODEID), parent (parent), locus (Location ())
+ resolved_node (UNKNOWN_NODEID), parent (parent)
{}
bool resolved () const { return resolved_node != UNKNOWN_NODEID; }
@@ -216,7 +216,6 @@ protected:
Analysis::Mappings *mappings;
NodeId resolved_node;
NodeId parent;
- Location locus;
};
} // namespace Resolver
diff --git a/gcc/rust/resolve/rust-ast-resolve-pattern.h b/gcc/rust/resolve/rust-ast-resolve-pattern.h
index b899754..35d95be 100644
--- a/gcc/rust/resolve/rust-ast-resolve-pattern.h
+++ b/gcc/rust/resolve/rust-ast-resolve-pattern.h
@@ -34,12 +34,7 @@ public:
{
ResolvePattern resolver (parent);
pattern->accept_vis (resolver);
- if (resolver.resolved_node == UNKNOWN_NODEID)
- {
- rust_error_at (resolver.locus, "failed to resolve pattern %s",
- pattern->as_string ().c_str ());
- }
- };
+ }
void visit (AST::IdentifierPattern &pattern) override
{