Lines Matching defs:rustfmt
23 // Run `rustfmt` on the given source string and return a tuple of the formatted
24 // bindings, and rustfmt's stderr.
25 fn rustfmt(source: String) -> (String, String) {
33 let mut rustfmt = {
35 p.args(["run", "nightly", "rustfmt", "--version"]);
39 let have_working_rustfmt = rustfmt
49 The latest `rustfmt` is required to run the `bindgen` test suite. Install
50 `rustfmt` with:
53 $ rustup component add rustfmt --toolchain nightly
63 p.args(["run", "nightly", "rustfmt"]);
71 concat!(env!("CARGO_MANIFEST_DIR"), "/tests/rustfmt.toml"),
77 .expect("should spawn `rustup run nightly rustfmt`");
99 // Ignore actual rustfmt status because it is often non-zero for trivial
101 let _ = child.wait().expect("should wait on rustfmt child OK");
106 .expect("should have written to child rustfmt's stdin OK");
109 .expect("rustfmt should only emit valid utf-8");
114 .expect("should have read child rustfmt's stderr OK");
253 rustfmt(actual)
259 let (expected, rustfmt_stderr) = rustfmt(expected);
386 "--no-rustfmt-bindings",
454 let (actual, stderr) = rustfmt(actual);
457 let (expected, _) = rustfmt(
481 let (actual, stderr) = rustfmt(actual);
484 let (expected, _) = rustfmt(
508 let (actual, stderr) = rustfmt(actual);
519 let (expected, _) = rustfmt(expected.to_string());
543 let (actual, stderr) = rustfmt(actual);
546 let (expected, _) = rustfmt(
575 let (actual, stderr) = rustfmt(actual);
586 let (expected, _) = rustfmt(expected.to_string());