summaryrefslogtreecommitdiff
path: root/src/dump_as_rust.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dump_as_rust.cpp')
-rw-r--r--src/dump_as_rust.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/dump_as_rust.cpp b/src/dump_as_rust.cpp
index b8443845..c26698f5 100644
--- a/src/dump_as_rust.cpp
+++ b/src/dump_as_rust.cpp
@@ -821,6 +821,17 @@ void RustPrinter::print_pattern(const AST::Pattern& p, bool is_refutable)
if( p.binding().is_valid() ) {
if( p.binding().m_mutable )
m_os << "mut ";
+ switch(p.binding().m_type)
+ {
+ case ::AST::PatternBinding::Type::MOVE:
+ break;
+ case ::AST::PatternBinding::Type::REF:
+ m_os << "ref ";
+ break;
+ case ::AST::PatternBinding::Type::MUTREF:
+ m_os << "ref mut ";
+ break;
+ }
m_os << p.binding().m_name << "/*"<<p.binding().m_slot<<"*/";
// If binding is irrefutable, and would be binding against a wildcard, just emit the name
if( !is_refutable && p.data().is_Any() )