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.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dump_as_rust.cpp b/src/dump_as_rust.cpp
index 536af263..abad2938 100644
--- a/src/dump_as_rust.cpp
+++ b/src/dump_as_rust.cpp
@@ -774,8 +774,8 @@ void RustPrinter::print_bounds(const AST::GenericParams& params)
void RustPrinter::print_pattern(const AST::Pattern& p, bool is_refutable)
{
- if( p.binding() != "" ) {
- m_os << p.binding();
+ if( p.binding().is_valid() ) {
+ m_os << p.binding().m_name;
// If binding is irrefutable, and would be binding against a wildcard, just emit the name
if( !is_refutable && p.data().is_Any() )
{