mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
Clarify that we are doing ptr.addr() internally
Co-authored-by: Ralf Jung <post@ralfj.de>
This commit is contained in:
parent
5896f8672d
commit
c9c1346874
@ -136,7 +136,7 @@ fn insert_alignment_check<'tcx>(
|
||||
.statements
|
||||
.push(Statement { source_info, kind: StatementKind::Assign(Box::new((thin_ptr, rvalue))) });
|
||||
|
||||
// Cast the pointer to a usize
|
||||
// Transmute the pointer to a usize (equivalent to `ptr.addr()`)
|
||||
let rvalue = Rvalue::Cast(CastKind::Transmute, Operand::Copy(thin_ptr), tcx.types.usize);
|
||||
let addr = local_decls.push(LocalDecl::with_source_info(tcx.types.usize, source_info)).into();
|
||||
block_data
|
||||
|
Loading…
Reference in New Issue
Block a user