about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-07-20 13:24:55 +0200
committerGitHub <noreply@github.com>2024-07-20 13:24:55 +0200
commit8963855ea18d4d4df674a63545a4fdab6386a3c0 (patch)
tree489c1e77ccaacd441081e8792eae73d3b6395a30
parentd846e9252c9791f024754811665d66d6c360c818 (diff)
parent36ebf7a3211d0cb327c01357545346d2a97d54cb (diff)
downloadrust-8963855ea18d4d4df674a63545a4fdab6386a3c0.tar.gz
rust-8963855ea18d4d4df674a63545a4fdab6386a3c0.zip
Rollup merge of #127964 - jieyouxu:rmake-rustfmt-skip, r=nnethercote
run_make_support: skip rustfmt for lib.rs

To avoid them getting reordered once https://github.com/rust-lang/rust/pull/125443 goes through.

r? ``@nnethercote`` (since you were working on this)
-rw-r--r--src/tools/run-make-support/src/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/run-make-support/src/lib.rs b/src/tools/run-make-support/src/lib.rs
index e6a45f57de6..b85191970de 100644
--- a/src/tools/run-make-support/src/lib.rs
+++ b/src/tools/run-make-support/src/lib.rs
@@ -3,6 +3,10 @@
 //! notably is built via cargo: this means that if your test wants some non-trivial utility, such
 //! as `object` or `wasmparser`, they can be re-exported and be made available through this library.
 
+// We want to control use declaration ordering and spacing (and preserve use group comments), so
+// skip rustfmt on this file.
+#![cfg_attr(rustfmt, rustfmt::skip)]
+
 mod command;
 mod macros;
 mod util;
@@ -18,6 +22,8 @@ pub mod scoped_run;
 pub mod string;
 pub mod targets;
 
+// Internally we call our fs-related support module as `fs`, but re-export its content as `rfs`
+// to tests to avoid colliding with commonly used `use std::fs;`.
 mod fs;
 
 /// [`std::fs`] wrappers and assorted filesystem-related helpers. Public to tests as `rfs` to not be