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.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/dump_as_rust.cpp b/src/dump_as_rust.cpp
index 357795c5..361bd245 100644
--- a/src/dump_as_rust.cpp
+++ b/src/dump_as_rust.cpp
@@ -801,14 +801,12 @@ void RustPrinter::print_pattern(const AST::Pattern& p, bool is_refutable)
m_os << "& ";
print_pattern(*v.sub, is_refutable);
}),
- (Value, {
- auto& v = p.data().as_Value();
- v.start->visit(*this);
- if( v.end.get() ) {
- m_os << " ... ";
- v.end->visit(*this);
+ (Value,
+ m_os << v.start;
+ if( ! v.end.is_Invalid() ) {
+ m_os << " ... " << v.end;
}
- }),
+ ),
(StructTuple, {
const auto& v = p.data().as_StructTuple();
m_os << v.path << "(";