aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-implitem.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/backend/rust-compile-implitem.h')
-rw-r--r--gcc/rust/backend/rust-compile-implitem.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/rust/backend/rust-compile-implitem.h b/gcc/rust/backend/rust-compile-implitem.h
index e446cf9..809cf56 100644
--- a/gcc/rust/backend/rust-compile-implitem.h
+++ b/gcc/rust/backend/rust-compile-implitem.h
@@ -319,15 +319,17 @@ public:
// items can be forward compiled which means we may not need to invoke this
// code. We might also have already compiled this generic function as well.
Bfunction *lookup = nullptr;
- if (ctx->lookup_function_decl (fntype->get_ty_ref (), &lookup, fntype))
+ if (ctx->lookup_function_decl (fntype->get_ty_ref (), &lookup))
{
// has this been added to the list then it must be finished
if (ctx->function_completed (lookup))
{
Bfunction *dummy = nullptr;
if (!ctx->lookup_function_decl (fntype->get_ty_ref (), &dummy))
- ctx->insert_function_decl (fntype->get_ty_ref (), lookup, fntype);
-
+ {
+ ctx->insert_function_decl (fntype->get_ty_ref (), lookup,
+ fntype);
+ }
return;
}
}