Skip to content

Commit

Permalink
interpret: make a comment less scary
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jul 1, 2022
1 parent 5018181 commit 65944ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_const_eval/src/interpret/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
let ptr = self.scalar_to_ptr(scalar)?;
match ptr.into_pointer_or_addr() {
Ok(ptr) => M::expose_ptr(self, ptr)?,
Err(_) => {} // do nothing, exposing an invalid pointer has no meaning
Err(_) => {} // Do nothing, exposing an invalid pointer (`None` provenance) is a NOP.
};
Ok(self.cast_from_int_like(scalar, src.layout, cast_ty)?.into())
}
Expand Down

0 comments on commit 65944ce

Please sign in to comment.