diff options
author | John Hodge <tpg@ucc.asn.au> | 2016-06-04 23:44:25 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2016-06-04 23:44:25 +0800 |
commit | b745c5f88faf89af9a487b7cf0cfc362b73c0423 (patch) | |
tree | e2b99aeaa80dc08cd96382c9be94e9c2a880a50a /src/dump_as_rust.cpp | |
parent | 31bff06cbd7b208096958edb21c4a50e17b6e9f5 (diff) | |
download | mrust-b745c5f88faf89af9a487b7cf0cfc362b73c0423.tar.gz |
Resolve - Fix variable resolution and pattern binding
Diffstat (limited to 'src/dump_as_rust.cpp')
-rw-r--r-- | src/dump_as_rust.cpp | 4 |
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() ) { |