We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 75b0a68 commit 89aac16Copy full SHA for 89aac16
src/librustc_mir/transform/generator.rs
@@ -266,7 +266,7 @@ impl TransformVisitor<'tcx> {
266
267
// Create a statement which reads the discriminant into a temporary
268
fn get_discr(&self, body: &mut Body<'tcx>) -> (Statement<'tcx>, Place<'tcx>) {
269
- let temp_decl = LocalDecl::new(self.tcx.types.isize, body.span).internal();
+ let temp_decl = LocalDecl::new(self.discr_ty, body.span).internal();
270
let local_decls_len = body.local_decls.push(temp_decl);
271
let temp = Place::from(local_decls_len);
272
0 commit comments