Lines Matching full:rustfmt
3 `bindgen` uses `rustfmt` to format the emitted bindings. This section describes
4 how to adjust the `rustfmt` behavior when being used from `bindgen`.
6 ## Passing a `rustfmt.toml` configuration file
8 `rustfmt` should automatically use any `rustfmt.toml` file that is present in
11 directory you can use the `--rustfmt-configuration-file` flag or the
15 ## Using a nightly release of `rustfmt`
17 If the `rustfmt` command does not correspond to a nightly release of `rustfmt`
33 $ rustup which rustfmt --toolchain=nightly
44 .args(["which", "rustfmt", "--toolchain", "nightly"])
55 String::from_utf8(output.stdout).expect("The `rustfmt` path is not valid `utf-8`");
85 ### Use `rustfmt`
87 `rustfmt` can be configured to normalize documentation. To do so, you have to
88 create a `rustfmt.toml` file with the following contents:
94 Then, you have set up `bindgen` so it passes this file to `rustfmt`. Given that
96 [unstable](https://github.com/rust-lang/rustfmt/issues/3351), you also have to
97 set up bindgen to use a `nightly` release of `rustfmt`.