aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-context.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/backend/rust-compile-context.h')
-rw-r--r--gcc/rust/backend/rust-compile-context.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/rust/backend/rust-compile-context.h b/gcc/rust/backend/rust-compile-context.h
index bb4f0ab..0aaf084 100644
--- a/gcc/rust/backend/rust-compile-context.h
+++ b/gcc/rust/backend/rust-compile-context.h
@@ -371,9 +371,14 @@ public:
parameters.push_back (compiled_param);
}
- translated = ctx->get_backend ()->function_type (
- receiver, parameters, results, NULL,
- ctx->get_mappings ()->lookup_location (type.get_ref ()));
+ if (!type.is_varadic ())
+ translated = ctx->get_backend ()->function_type (
+ receiver, parameters, results, NULL,
+ ctx->get_mappings ()->lookup_location (type.get_ref ()));
+ else
+ translated = ctx->get_backend ()->function_type_varadic (
+ receiver, parameters, results, NULL,
+ ctx->get_mappings ()->lookup_location (type.get_ref ()));
}
void visit (TyTy::FnPtr &type) override