From 312e1515ec293de22da9b559b4e1c6eab6bc34a2 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Tue, 16 Jan 2024 19:10:02 +0100 Subject: [PATCH] Always use a nightly `rustfmt` in `dprint fmt` (#1694) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this, several of the formatting directives in our `rustfmt.toml` file won’t have any effect. This will in turn lead to mismatches between the formatting done locally and in CI. This creates a dependency on `rustup`, but I think this is overall better than silently ignoring the formatting directives. From the discussion in #1682. --- dprint.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dprint.json b/dprint.json index 6de56c6d85e8..314447f0b804 100644 --- a/dprint.json +++ b/dprint.json @@ -9,7 +9,7 @@ "command": "yapf3", "exts": ["py"] }, { - "command": "rustfmt --edition 2021", + "command": "rustup run nightly rustfmt --edition 2021", "exts": ["rs"] }, { "command": "msgcat -",