Skip to content

Commit 75e754a

Browse files
danielsntedinski
authored andcommitted
Temporary fix to unblock rust-lang#822 (rust-lang#826)
1 parent b4b6736 commit 75e754a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/kani-compiler/rustc_codegen_kani/src/codegen/operand.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,11 @@ impl<'tcx> GotocCtx<'tcx> {
392392
base_addr
393393
.cast_to(Type::unsigned_int(8).to_pointer())
394394
.plus(Expr::int_constant(offset.bytes(), Type::unsigned_int(64)))
395-
.cast_to(res_t)
395+
// The `cast_to` operation causes https://github.com/model-checking/kani/issues/822
396+
// FIXME: Changing to a transmute to temporarily unblock, proper fix is to
397+
// unwrap the transparent struct.
398+
.transmute_to(res_t, &self.symbol_table)
399+
//.cast_to(res_t)
396400
}
397401

398402
pub fn codegen_allocation_auto_imm_name<F: FnOnce(&mut GotocCtx<'tcx>) -> String>(
File renamed without changes.

0 commit comments

Comments
 (0)