summaryrefslogtreecommitdiff
path: root/src/mir/from_hir.hpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2019-06-08 11:22:36 +0800
committerJohn Hodge <tpg@ucc.asn.au>2019-06-08 11:22:36 +0800
commitaa1998553ad87ca55870a84b7d2ee946b421ec65 (patch)
tree8921c79ff8082e376041b193f4318add5e80f56b /src/mir/from_hir.hpp
parentf2fdba69bf483c3516550f99fb6179acd95c6edb (diff)
downloadmrust-aa1998553ad87ca55870a84b7d2ee946b421ec65.tar.gz
MIR Gen - Fix clobbering of value state when fields are reassigned
Diffstat (limited to 'src/mir/from_hir.hpp')
-rw-r--r--src/mir/from_hir.hpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mir/from_hir.hpp b/src/mir/from_hir.hpp
index a1f9a10f..c29d6283 100644
--- a/src/mir/from_hir.hpp
+++ b/src/mir/from_hir.hpp
@@ -293,8 +293,7 @@ private:
const VarState& get_slot_state(const Span& sp, unsigned int idx, SlotType type, unsigned int skip_count=0) const;
VarState& get_slot_state_mut(const Span& sp, unsigned int idx, SlotType type);
- VarState* get_val_state_mut_p(const Span& sp, const ::MIR::LValue& lv);
- VarState& get_val_state_mut(const Span& sp, const ::MIR::LValue& lv);
+ VarState* get_val_state_mut_p(const Span& sp, const ::MIR::LValue& lv, bool expect_valid=false);
void terminate_loop_early(const Span& sp, ScopeType::Data_Loop& sd_loop);