Skip to content

Commit bd95859

Browse files
committed
hack: do not modify types in this case
1 parent 7cf9dae commit bd95859

File tree

1 file changed

+0
-11
lines changed
  • c2rust-transpile/src/translator

1 file changed

+0
-11
lines changed

c2rust-transpile/src/translator/mod.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3556,17 +3556,6 @@ impl<'c> Translation<'c> {
35563556
val.prepend_stmts(stmts);
35573557
val
35583558
} else {
3559-
// Cast the return types of functions whose return types are synthetic.
3560-
if let Some(func_decl) = self.ast_context.function_declref_decl(expr) {
3561-
let kind_with_declared_args =
3562-
self.ast_context.fn_decl_ty_with_declared_args(func_decl);
3563-
let func_ty = self
3564-
.ast_context
3565-
.type_for_kind(&kind_with_declared_args)
3566-
.expect(&format!("no type for kind {kind_with_declared_args:?}"));
3567-
source_ty = CQualTypeId::new(func_ty);
3568-
}
3569-
35703559
// In general, if we are casting the result of an expression, then the inner
35713560
// expression should be translated to whatever type it normally would.
35723561
// But for literals, if we don't absolutely have to cast, we would rather the

0 commit comments

Comments
 (0)