-
-
Notifications
You must be signed in to change notification settings - Fork 290
Instruct rustfmt
to use --edition 2021
#2002
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
Instruct rustfmt
to use --edition 2021
#2002
Conversation
This is necessary in order for `rustfmt` to understand our (relatively-new) usages of rust `c"C Strings"`. However, the word `gen` has been promoted to a keyword in 2024 edition, which borks `rustfmt` in a different way. Fixing this requires that we have a version of bindgen with rust-lang/rust-bindgen#3100, which, of course, has not been released yet. So I don't know where to go next.
That explains the issue I faced today where one of these files contained a single line of code and therefore was useless. |
I've updated this PR to set bindgen = { git = "https://github.com/rust-lang/rust-bindgen.git", rev = "20aa65a", features = ["experimental", "runtime"] } In Assuming CI passes, I'm going to merge this. |
Sign together with Niko about your dependencies: https://youtu.be/thdpaw_3VTw |
|
Hmm. I didn’t try that. I’ll give it a shot and see what happens. |
rustfmt
to use --edition 2024
rustfmt
to use --edition 2021
The problem here is that `pgrx-bindgen`'s `rust_fmt()` step was (silently) failing because `rustfmt` without `--edition 2021` doesn't understand rust `c"C Cstrings"`.
The problem here is that
pgrx-bindgen
'srust_fmt()
step was (silently) failing becauserustfmt
without--edition 2021
doesn't understand rustc"C Cstrings"
.