We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5896f86 commit c9c1346Copy full SHA for c9c1346
compiler/rustc_mir_transform/src/check_alignment.rs
@@ -136,7 +136,7 @@ fn insert_alignment_check<'tcx>(
136
.statements
137
.push(Statement { source_info, kind: StatementKind::Assign(Box::new((thin_ptr, rvalue))) });
138
139
- // Cast the pointer to a usize
+ // Transmute the pointer to a usize (equivalent to `ptr.addr()`)
140
let rvalue = Rvalue::Cast(CastKind::Transmute, Operand::Copy(thin_ptr), tcx.types.usize);
141
let addr = local_decls.push(LocalDecl::with_source_info(tcx.types.usize, source_info)).into();
142
block_data
0 commit comments