Skip to content

Commit 83b0a8a

Browse files
committed
transpile: try using expected type even when translating ArrayToPointerDecay casts
I've forgotten exactly why this is load-bearing; this should demonstrate it
1 parent 9f8a546 commit 83b0a8a

File tree

1 file changed

+1
-5
lines changed
  • c2rust-transpile/src/translator

1 file changed

+1
-5
lines changed

c2rust-transpile/src/translator/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3575,11 +3575,7 @@ impl<'c> Translation<'c> {
35753575
return Ok(val);
35763576
}
35773577

3578-
let target_ty = if kind == CastKind::ArrayToPointerDecay {
3579-
ty
3580-
} else {
3581-
override_ty.unwrap_or(ty)
3582-
};
3578+
let target_ty = override_ty.unwrap_or(ty);
35833579

35843580
self.convert_cast(
35853581
ctx,

0 commit comments

Comments
 (0)