-
Notifications
You must be signed in to change notification settings - Fork 711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using generate_cstr(true) breaks output format #3047
Comments
Could you please minimize / give an example of the difference? Thanks! |
This is due to rustfmt not understanding the See also https://rust-lang.zulipchat.com/#narrow/channel/469104-wg-bindgen/topic/Rustfmt.20and.20editions |
A workaround for this issue: create a |
indeed, if you use a feature only available on edition 2021, you have to use a toolchain with that edition enabled. I wouldn't say this is a workaround. |
I think its a workaround because a user would expect this to work automagically - i.e. bindgen output should be proper in every environment - thus we really need to pass |
In that case maybe we should unconditionally use 2018 as the default edition instead.
Yes but you can also pass the edition in your |
Is there ever a case when bindgen 2018 output can be formatted in some broken way by the 2021 edition formatter? If not, we might as well pass the |
#3063 fixes this issue |
To reproduce,
libsqlite3-sys
folder, executeupgrade.sh
scriptWithout the following patch, generated bindings are correctly formatted.
But not with:
The text was updated successfully, but these errors were encountered: