diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-11-17 17:38:14 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-17 17:38:14 -0600 |
commit | 53173928934b67dc62389dac6771d27b73b288e9 (patch) | |
tree | 3933edd411b8878bfee09a99dfcfe00f2bc5ce7a /libbindgen/src/codegen/mod.rs | |
parent | 3761ada615983a20456370dacbbb41628c69650e (diff) | |
parent | 06e5f6c8bcc7fba5994a349b9ce88c1063eb4279 (diff) |
Auto merge of #276 - emilio:vartype-fixes, r=fitzgen
ir: Avoid generating out-of-range values in constants.
Partially addresses #274 until my patch or a similar one gets accepted and we can use it.
r? @fitzgen or @upsuper
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. |