Skip to content

Commit

Permalink
c2rust transpile: Allow any integral types in init lists, not just …
Browse files Browse the repository at this point in the history
…`char` and `int`.
  • Loading branch information
kkysen committed Apr 2, 2024
1 parent fb37a81 commit 9c7ce66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion c2rust-transpile/src/translator/literals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ impl<'c> Translation<'c> {
CTypeKind::Vector(CQualTypeId { ctype, .. }, len) => {
self.vector_list_initializer(ctx, ids, ctype, len)
}
CTypeKind::Char | CTypeKind::Int => {
ref kind if kind.is_integral_type() => {
let id = ids.first().unwrap();
self.convert_expr(ctx.used(), *id)
}
Expand Down

0 comments on commit 9c7ce66

Please sign in to comment.