aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-fnparam.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/backend/rust-compile-fnparam.h')
-rw-r--r--gcc/rust/backend/rust-compile-fnparam.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/rust/backend/rust-compile-fnparam.h b/gcc/rust/backend/rust-compile-fnparam.h
index 74df725..5e3cfaa 100644
--- a/gcc/rust/backend/rust-compile-fnparam.h
+++ b/gcc/rust/backend/rust-compile-fnparam.h
@@ -36,6 +36,14 @@ public:
return compiler.compiled_param;
}
+ static Bvariable *compile (Context *ctx, tree fndecl, HIR::Pattern *param,
+ tree decl_type, Location locus)
+ {
+ CompileFnParam compiler (ctx, fndecl, decl_type, locus);
+ param->accept_vis (compiler);
+ return compiler.compiled_param;
+ }
+
void visit (HIR::IdentifierPattern &pattern) override
{
if (!pattern.is_mut ())