diff options
author | Emilio Cobos Álvarez <ecoal95@gmail.com> | 2016-11-17 10:50:48 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <ecoal95@gmail.com> | 2016-11-17 11:09:01 +0100 |
commit | 06e5f6c8bcc7fba5994a349b9ce88c1063eb4279 (patch) | |
tree | b31a8a8e02f63325d19a327b73e2a59632c310b4 /libbindgen/src/codegen/mod.rs | |
parent | b9e15e9fc7f7100aa03256b6997639142ab38e87 (diff) |
ir: Avoid generating out-of-range values in constants.
Fixes #274
Diffstat (limited to 'libbindgen/src/codegen/mod.rs')
-rw-r--r-- | libbindgen/src/codegen/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libbindgen/src/codegen/mod.rs b/libbindgen/src/codegen/mod.rs index f15b92d1..5a54c113 100644 --- a/libbindgen/src/codegen/mod.rs +++ b/libbindgen/src/codegen/mod.rs @@ -228,7 +228,8 @@ impl CodeGenerator for Item { result: &mut CodegenResult, _extra: &()) { if self.is_hidden(ctx) || result.seen(self.id()) { - debug!("<Item as CodeGenerator>::codegen: Ignoring hidden or seen: self = {:?}", self); + debug!("<Item as CodeGenerator>::codegen: Ignoring hidden or seen: \ + self = {:?}", self); return; } @@ -328,8 +329,7 @@ impl CodeGenerator for Var { .build(ty) } VarType::Int(val) => { - const_item.build(helpers::ast_ty::int_expr(val)) - .build(ty) + const_item.build(helpers::ast_ty::int_expr(val)).build(ty) } VarType::String(ref bytes) => { // Account the trailing zero. |