Skip to content

Commit

Permalink
Rollup merge of rust-lang#60991 - spastorino:local-decls-push, r=oli-obk
Browse files Browse the repository at this point in the history
LocalDecl push returns Local len

r? @oli-obk
  • Loading branch information
Centril authored May 21, 2019
2 parents d063b74 + 419ca9d commit d18b4c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc_mir/transform/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ impl<'a, 'tcx> TransformVisitor<'a, 'tcx> {
// Create a statement which reads the discriminant into a temporary
fn get_discr(&self, mir: &mut Mir<'tcx>) -> (Statement<'tcx>, Place<'tcx>) {
let temp_decl = LocalDecl::new_internal(self.tcx.types.isize, mir.span);
let temp = Place::Base(PlaceBase::Local(Local::new(mir.local_decls.len())));
mir.local_decls.push(temp_decl);
let local_decls_len = mir.local_decls.push(temp_decl);
let temp = Place::Base(PlaceBase::Local(local_decls_len));

let self_place = Place::Base(PlaceBase::Local(self_arg()));
let assign = Statement {
Expand Down

0 comments on commit d18b4c1

Please sign in to comment.