diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | src/ast/expr.cpp | 3 |
2 files changed, 5 insertions, 2 deletions
@@ -266,9 +266,11 @@ output/libpanic_unwind.hir: $(call fcn_extcrate, core alloc libc unwind) output/libpanic_abort.hir: $(call fcn_extcrate, core $(call fn_getdeps, $(RUSTCSRC)src/libpanic_abort/lib.rs)) output/libtest.hir: $(call fcn_extcrate, std getopts term panic_unwind) output/libgetopts.hir: output/libstd.hir -output/libflate2.hir: $(call fcn_extcrate, std $(call fn_getdeps, $(RUSTCSRC)src/vendor/flate2/src/lib.rs)) +output/libflate2.hir: $(call fcn_extcrate, std libc miniz_sys) output/liblog.hir: $(call fcn_extcrate, std $(call fn_getdeps, $(RUSTCSRC)src/vendor/log/src/lib.rs)) output/libenv_logger.hir: $(call fcn_extcrate, std $(call fn_getdeps, $(RUSTCSRC)src/vendor/env_logger/src/lib.rs)) +output/libminiz_sys.hir: $(RUSTCSRC)src/vendor/miniz-sys/lib.rs $(call fcn_extcrate, std) + $(DBG) $(ENV_$@) $(BIN) $< --crate-type rlib --crate-name miniz_sys -o $@ $(RUST_FLAGS) $(ARGS_$@) $(PIPECMD) output/liballoc_system.hir: $(call fcn_extcrate, core libc) output/liballoc_jemalloc.hir: $(call fcn_extcrate, core libc) diff --git a/src/ast/expr.cpp b/src/ast/expr.cpp index 535c2e24..7cf10b27 100644 --- a/src/ast/expr.cpp +++ b/src/ast/expr.cpp @@ -223,7 +223,8 @@ NODE(ExprNode_If, { return NEWNODE(ExprNode_If, m_cond->clone(), m_true->clone(), OPT_CLONE(m_false)); }) NODE(ExprNode_IfLet, { - os << "if let " << m_pattern << " = (" << *m_value << ") { " << *m_true << " } else { " << *m_false << " }"; + os << "if let " << m_pattern << " = (" << *m_value << ") { " << *m_true << " }"; + if(m_false) os << " else { " << *m_false << " }"; },{ return NEWNODE(ExprNode_IfLet, m_pattern.clone(), m_value->clone(), m_true->clone(), OPT_CLONE(m_false)); }) |