Skip to content

Commit 740ec66

Browse files
authored
Add prettyplease feature to bindgen-cli (#2789)
* Add prettyplease feature to bindgen-cli The bindgen documentation explictly mentions being able to use `--formatter=prettyplease`, but currently the prettyplease feature has no way to be enabled. Enable it by default, since the documentation also doesn't mention needing to cargo install with a feature. Documentation: https://rust-lang.github.io/rust-bindgen/code-formatting.html * Add Changelog entry for bindgen-cli prettyplease fix
1 parent 3b5ce9c commit 740ec66

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@
207207
- Add target mappings for riscv64imac and riscv32imafc.
208208
## Removed
209209
## Fixed
210+
- Fix `--formatter=prettyplease` not working in `bindgen-cli` by adding `prettyplease` feature and
211+
enabling it by default for `bindgen-cli` (#2789) .
210212
## Security
211213

212214
# 0.69.4 (2024-02-04)

bindgen-cli/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ path = "main.rs"
2020
name = "bindgen"
2121

2222
[dependencies]
23-
bindgen = { path = "../bindgen", version = "=0.69.4", default-features = false, features = ["__cli", "experimental"] }
23+
bindgen = { path = "../bindgen", version = "=0.69.4", default-features = false, features = ["__cli", "experimental", "prettyplease"] }
2424
clap = { version = "4", features = ["derive"] }
2525
clap_complete = "4"
2626
env_logger = { version = "0.10.0", optional = true }
@@ -34,6 +34,7 @@ static = ["bindgen/static"]
3434
runtime = ["bindgen/runtime"]
3535
# Dynamically discover a `rustfmt` binary using the `which` crate
3636
which-rustfmt = ["bindgen/which-rustfmt"]
37+
prettyplease = ["bindgen/prettyplease"]
3738

3839
## The following features are for internal use and they shouldn't be used if
3940
## you're not hacking on bindgen

0 commit comments

Comments
 (0)