• Home
  • Raw
  • Download

Lines Matching full: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) { in rustfmt() function
29 if env::var_os("RUSTFMT").is_some() { in rustfmt()
33 let mut rustfmt = { in rustfmt() localVariable
35 p.args(["run", "nightly", "rustfmt", "--version"]); in rustfmt()
39 let have_working_rustfmt = rustfmt in rustfmt()
49 The latest `rustfmt` is required to run the `bindgen` test suite. Install in rustfmt()
50 `rustfmt` with: in rustfmt()
53 $ rustup component add rustfmt --toolchain nightly in rustfmt()
59 let mut child = match env::var_os("RUSTFMT") { in rustfmt()
63 p.args(["run", "nightly", "rustfmt"]); in rustfmt()
71 concat!(env!("CARGO_MANIFEST_DIR"), "/tests/rustfmt.toml"), in rustfmt()
77 .expect("should spawn `rustup run nightly rustfmt`"); in rustfmt()
99 // Ignore actual rustfmt status because it is often non-zero for trivial in rustfmt()
101 let _ = child.wait().expect("should wait on rustfmt child OK"); in rustfmt()
106 .expect("should have written to child rustfmt's stdin OK"); in rustfmt()
109 .expect("rustfmt should only emit valid utf-8"); in rustfmt()
114 .expect("should have read child rustfmt's stderr OK"); in rustfmt()
253 rustfmt(actual) in compare_generated_header()
259 let (expected, rustfmt_stderr) = rustfmt(expected); in compare_generated_header()
386 "--no-rustfmt-bindings", in create_bindgen_builder()
454 let (actual, stderr) = rustfmt(actual); in test_clang_env_args()
457 let (expected, _) = rustfmt( in test_clang_env_args()
481 let (actual, stderr) = rustfmt(actual); in test_header_contents()
484 let (expected, _) = rustfmt( in test_header_contents()
508 let (actual, stderr) = rustfmt(actual); in test_multiple_header_calls_in_builder()
519 let (expected, _) = rustfmt(expected.to_string()); in test_multiple_header_calls_in_builder()
543 let (actual, stderr) = rustfmt(actual); in test_multiple_header_contents()
546 let (expected, _) = rustfmt( in test_multiple_header_contents()
575 let (actual, stderr) = rustfmt(actual); in test_mixed_header_and_header_contents()
586 let (expected, _) = rustfmt(expected.to_string()); in test_mixed_header_and_header_contents()