Skip to content

Commit 65944ce

Browse files
committed
interpret: make a comment less scary
1 parent 5018181 commit 65944ce

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_const_eval/src/interpret

1 file changed

+1
-1
lines changed

compiler/rustc_const_eval/src/interpret/cast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
202202
let ptr = self.scalar_to_ptr(scalar)?;
203203
match ptr.into_pointer_or_addr() {
204204
Ok(ptr) => M::expose_ptr(self, ptr)?,
205-
Err(_) => {} // do nothing, exposing an invalid pointer has no meaning
205+
Err(_) => {} // Do nothing, exposing an invalid pointer (`None` provenance) is a NOP.
206206
};
207207
Ok(self.cast_from_int_like(scalar, src.layout, cast_ty)?.into())
208208
}

0 commit comments

Comments
 (0)