aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/backend/rust-compile-base.cc')
-rw-r--r--gcc/rust/backend/rust-compile-base.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/rust/backend/rust-compile-base.cc b/gcc/rust/backend/rust-compile-base.cc
index 066ef43..3e6e370 100644
--- a/gcc/rust/backend/rust-compile-base.cc
+++ b/gcc/rust/backend/rust-compile-base.cc
@@ -404,19 +404,16 @@ std::vector<Bvariable *>
HIRCompileBase::compile_locals_for_block (Context *ctx, Resolver::Rib &rib,
tree fndecl)
{
- CrateNum crate = ctx->get_mappings ()->get_current_crate ();
-
std::vector<Bvariable *> locals;
for (auto it : rib.get_declarations ())
{
NodeId node_id = it.first;
HirId ref = UNKNOWN_HIRID;
- if (!ctx->get_mappings ()->lookup_node_to_hir (crate, node_id, &ref))
+ if (!ctx->get_mappings ()->lookup_node_to_hir (node_id, &ref))
continue;
// we only care about local patterns
- HIR::Pattern *pattern
- = ctx->get_mappings ()->lookup_hir_pattern (crate, ref);
+ HIR::Pattern *pattern = ctx->get_mappings ()->lookup_hir_pattern (ref);
if (pattern == nullptr)
continue;