Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle _Static_assert gracefully. Closes #276 #277

Merged
merged 7 commits into from
Jul 9, 2020
Prev Previous commit
Next Next commit
Update c2rust-transpile/src/c_ast/iterators.rs
Co-authored-by: ahomescu <ah@immunant.com>
  • Loading branch information
thedataking and ahomescu committed Jul 9, 2020
commit ea58e2112bf9cf33922a94eba348d05208176a09
2 changes: 1 addition & 1 deletion c2rust-transpile/src/c_ast/iterators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ fn immediate_decl_children(kind: &CDeclKind) -> Vec<SomeId> {
NonCanonicalDecl { canonical_decl } => intos![canonical_decl],
StaticAssert { assert_expr, message } => {
if let Some(message) = message {
intos![assert_expr, message.unwrap()]
intos![assert_expr, message]
} else {
intos![assert_expr]
}
Expand Down