about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa
diff options
context:
space:
mode:
authorDylan MacKenzie <ecstaticmorse@gmail.com>2020-04-02 10:54:24 -0700
committerDylan MacKenzie <ecstaticmorse@gmail.com>2020-05-03 11:36:11 -0700
commitd0086166b725d184b84b84b6270446998f6656cc (patch)
tree2e61512e6e0f7a5550922cf9b805f67ce04f47ed /src/librustc_codegen_ssa
parente5f35df2c6944b843b08369c4b2ff3bdb0beb2d2 (diff)
Add `MutatingUseContext::Yield`
...emulating `MutatingUseContext::Call`
Diffstat (limited to 'src/librustc_codegen_ssa')
-rw-r--r--src/librustc_codegen_ssa/mir/analyze.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_codegen_ssa/mir/analyze.rs b/src/librustc_codegen_ssa/mir/analyze.rs
index a677ffea3af..9fcaf2818e8 100644
--- a/src/librustc_codegen_ssa/mir/analyze.rs
+++ b/src/librustc_codegen_ssa/mir/analyze.rs
@@ -269,7 +269,8 @@ impl<'mir, 'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> Visitor<'tcx>
 
     fn visit_local(&mut self, &local: &mir::Local, context: PlaceContext, location: Location) {
         match context {
-            PlaceContext::MutatingUse(MutatingUseContext::Call) => {
+            PlaceContext::MutatingUse(MutatingUseContext::Call)
+            | PlaceContext::MutatingUse(MutatingUseContext::Yield) => {
                 self.assign(local, location);
             }