Skip to content

Commit 9c7b404

Browse files
author
Gabi Ganam
committed
Fix generated constants: f64::INFINITY, f64::NEG_ INFINITY, f64::NAN
rust-lang#2853
1 parent 1078f1b commit 9c7b404

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

bindgen/codegen/helpers.rs

-1
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

+1-1
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)