Skip to content

Commit b5b1647

Browse files
ivarflakstadoli-obk
authored andcommitted
Document which discriminant we write
Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
1 parent 5d5bc83 commit b5b1647

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/rustc_const_eval/src/interpret/intrinsics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
256256
let vtable_ptr = self.get_vtable_ptr(tp_ty, preds)?;
257257
self.write_pointer(vtable_ptr, dest)?;
258258
} else {
259+
// Write `None`
259260
self.write_discriminant(FIRST_VARIANT, dest)?;
260261
}
261262
}

0 commit comments

Comments
 (0)