Address review comment: StatementKind::StorageDead
has an effect (running dtors) relevant to borrowck.
This commit is contained in:
parent
b6528f073f
commit
6d6280e00c
@ -222,10 +222,17 @@ impl<'c, 'b, 'a: 'b+'c, 'gcx, 'tcx: 'a> DataflowResultsConsumer<'b, 'gcx>
|
|||||||
}
|
}
|
||||||
StatementKind::Nop |
|
StatementKind::Nop |
|
||||||
StatementKind::Validate(..) |
|
StatementKind::Validate(..) |
|
||||||
StatementKind::StorageLive(..) |
|
StatementKind::StorageLive(..) => {
|
||||||
StatementKind::StorageDead(..) => {
|
|
||||||
// ignored by borrowck
|
// ignored by borrowck
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StatementKind::StorageDead(ref lvalue) => {
|
||||||
|
// causes non-drop values to be dropped.
|
||||||
|
self.consume_lvalue(ContextKind::StorageDead.new(location),
|
||||||
|
ConsumeKind::Consume,
|
||||||
|
(lvalue, span),
|
||||||
|
flow_state)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1112,6 +1119,7 @@ enum ContextKind {
|
|||||||
CallOperand,
|
CallOperand,
|
||||||
CallDest,
|
CallDest,
|
||||||
Assert,
|
Assert,
|
||||||
|
StorageDead,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ContextKind {
|
impl ContextKind {
|
||||||
|
Loading…
Reference in New Issue
Block a user