Skip to content

Commit

Permalink
fix discriminant type in generator transform
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed May 23, 2020
1 parent 75b0a68 commit 89aac16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_mir/transform/generator.rs
Expand Up @@ -266,7 +266,7 @@ impl TransformVisitor<'tcx> {

// Create a statement which reads the discriminant into a temporary
fn get_discr(&self, body: &mut Body<'tcx>) -> (Statement<'tcx>, Place<'tcx>) {
let temp_decl = LocalDecl::new(self.tcx.types.isize, body.span).internal();
let temp_decl = LocalDecl::new(self.discr_ty, body.span).internal();
let local_decls_len = body.local_decls.push(temp_decl);
let temp = Place::from(local_decls_len);

Expand Down

0 comments on commit 89aac16

Please sign in to comment.