Closed siscia closed 6 years ago
This is a rustfmt bug. either rustfmt_bindings(false)
, or update rustfmt-nightly
. See #1279, etc.
Thanks for the report!
Actually on bindgen 0.35.0 it didn't work.
Am I doing something wrong?
let bindings =
bindgen::Builder::default()
.parse_callbacks(Box::new(SqliteTypeChooser))
.rustfmt_bindings(false) // see https://github.com/rust-lang-nursery/rust-bindgen/issues/1306#event-1597477817
.header("redis_dependencies.h")
.generate()
.expect("Unable to generate bindings for Redis");
Hmm, that should work indeed, could you upload the generated bindings?
Sorry, it worked perfectly, it was simply that I had two libraries I was using bindgen on, the error was the same but on different libraries.
Input C/C++ Header
https://github.com/RedBeardLab/rediSQL/blob/master/redisql_lib/src/CDeps/Redis/include/redismodule.h
Bindgen Invocation
Actual Results
and/or
Expected Results
Valid Rust Code
Sorry that I wasn't able to minimize your search space by providing a smaller header.