Skip to content

Commit a2c147b

Browse files
Gabi Ganampvdrz
authored andcommitted
Fix generated constants: f64::INFINITY, f64::NEG_ INFINITY, f64::NAN
#2853
1 parent a2360d1 commit a2c147b

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

bindgen/codegen/helpers.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ pub(crate) mod ast_ty {
302302
}
303303

304304
pub(crate) fn float_expr(
305-
ctx: &BindgenContext,
306305
f: f64,
307306
) -> Result<TokenStream, ()> {
308307
if f.is_finite() {

bindgen/codegen/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ impl CodeGenerator for Var {
756756
}
757757
}
758758
VarType::Float(f) => {
759-
if let Ok(expr) = helpers::ast_ty::float_expr(ctx, f) {
759+
if let Ok(expr) = helpers::ast_ty::float_expr(f) {
760760
result.push(quote! {
761761
#(#attrs)*
762762
pub const #canonical_ident : #ty = #expr ;

0 commit comments

Comments
 (0)