about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/tests/intro.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/doc/rustc-dev-guide/src/tests/intro.md b/src/doc/rustc-dev-guide/src/tests/intro.md
index 4572d23ca95..eb8aec80084 100644
--- a/src/doc/rustc-dev-guide/src/tests/intro.md
+++ b/src/doc/rustc-dev-guide/src/tests/intro.md
@@ -63,6 +63,15 @@ including:
 
   Example: `./x.py test src/tools/tidy`
 
+- **Formatting** – Rustfmt is integrated with the build system to enforce
+  uniform style across the compiler. In the CI, we check that the formatting
+  is correct.
+
+  Example: `./x.py fmt --check` checks formatting an exits with an error if
+  formatting is needed.
+
+  Example: `./x.py fmt` runs rustfmt on the codebase.
+
 - **Unit tests** – The Rust standard library and many of the Rust packages
   include typical Rust `#[test]` unittests.  Under the hood, `x.py` will run
   `cargo test` on each package to run all the tests.