From 36ebf7a3211d0cb327c01357545346d2a97d54cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=9D=B0=E5=8F=8B=20Jieyou=20Xu=20=28Joe=29?= Date: Fri, 19 Jul 2024 11:49:26 +0000 Subject: [PATCH] run_make_support: skip rustfmt for lib.rs to preserve use ordering --- src/tools/run-make-support/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tools/run-make-support/src/lib.rs b/src/tools/run-make-support/src/lib.rs index e6a45f57de608..b85191970de62 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