Closed robin-nitrokey closed 1 week ago
On which OS? This works for me on trunk and on the crates.io crate... that string is nowhere in the source code...
We're having similar trouble in our setup. A commonality between those is that we're also more "in the embedded area". We haven't managed to track down the source of the string either, but I did find that it is emitted as part of the bindgen generation (an strace shows that the odd string is written in the same write call as the rest of what our bindings.wrtite_to_file produces).
I can reproduce this on Debian GNU/Linux with a current nightly Rust installed through rustup; the issue does not appear with stable.
Correction: The string is not necessarily written in the same process: I mistook the contiguious read from the built file for a write.
The write actually originates from a some process writing it to file descriptor 1, its stdout -- which makes the whole thing appear more like some printf that escaped debugging.
… and it is rustfmt, where it is already reported: https://github.com/rust-lang/rustfmt/issues/6210
(So I'd guess this is a duplicate, and we all wait for a new nightly where the offending line is reverted).
Thanks! Yeah let´s close as a dupe of https://github.com/rust-lang/rustfmt/issues/6210
Input C/C++ Header
Bindgen Invocation
Actual Results
Expected Results
The generated bindings should compile properly and not contain arbitrary strings.
notes:
Builder::generate
frombuild.rs