Skip to content

Commit b08d57f

Browse files
Document which discriminant we write
Co-authored-by: Oli Scherer <[email protected]>
1 parent d9b8269 commit b08d57f

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
@@ -185,6 +185,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
185185
let vtable_ptr = self.get_vtable_ptr(tp_ty, preds)?;
186186
self.write_pointer(vtable_ptr, dest)?;
187187
} else {
188+
// Write `None`
188189
self.write_discriminant(FIRST_VARIANT, dest)?;
189190
}
190191
}

0 commit comments

Comments
 (0)