Inspect now does not force on-stack Lvalue

This commit is contained in:
Simonas Kazlauskas 2017-02-03 00:07:31 +02:00
parent 76d9a4e646
commit 362eb7ea07

View file

@ -156,10 +156,10 @@ impl<'mir, 'a, 'tcx> Visitor<'tcx> for LocalAnalyzer<'mir, 'a, 'tcx> {
LvalueContext::StorageLive |
LvalueContext::StorageDead |
LvalueContext::Inspect |
LvalueContext::Consume => {}
LvalueContext::Store |
LvalueContext::Inspect |
LvalueContext::Borrow { .. } |
LvalueContext::Projection(..) => {
self.mark_as_lvalue(index);