summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-02-27 14:22:15 +0900
committerWho? Me?! <mark-i-m@users.noreply.github.com>2020-02-27 11:10:14 -0600
commit0f835fbd8d0157abd4235ea376b7ddc8722e13d1 (patch)
tree390244225ddf3dc9ff2d8f7e7e053ae02cc7ac45 /src/doc/rustc-dev-guide
parentfc249196445cb28796d74e379f6a740a74f1c8d8 (diff)
downloadrust-0f835fbd8d0157abd4235ea376b7ddc8722e13d1.tar.gz
rust-0f835fbd8d0157abd4235ea376b7ddc8722e13d1.zip
Move bless section to running chapter
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/tests/adding.md19
-rw-r--r--src/doc/rustc-dev-guide/src/tests/running.md14
2 files changed, 16 insertions, 17 deletions
diff --git a/src/doc/rustc-dev-guide/src/tests/adding.md b/src/doc/rustc-dev-guide/src/tests/adding.md
index 8492cbbcc92..d8cf8e8841c 100644
--- a/src/doc/rustc-dev-guide/src/tests/adding.md
+++ b/src/doc/rustc-dev-guide/src/tests/adding.md
@@ -150,7 +150,7 @@ source.
   compares against `.fixed` (they must match). Finally, the fixed
   source is compiled, and this compilation is required to succeed.
   The `.fixed` file can also be generated automatically with the
-  `--bless` option, discussed [below](#bless).
+  `--bless` option, discribed in [this section][bless].
 * `min-gdb-version` specifies the minimum gdb version required for
   this test; see also `ignore-gdb-version`
 * `min-lldb-version` specifies the minimum lldb version required for
@@ -185,6 +185,7 @@ source.
   have a gate test.
 
 [`header.rs`]: https://github.com/rust-lang/rust/tree/master/src/tools/compiletest/src/header.rs
+[bless]: ./running.md#editing-and-updating-the-reference-files
 
 <a name="error_annotations"></a>
 
@@ -284,22 +285,6 @@ you can even run the resulting program. Just add one of the following
 - `// run-pass` – compilation should succeed and we should run the
   resulting binary
 
-<a name="bless"></a>
-
-### Editing and updating the reference files
-
-If you have changed the compiler's output intentionally, or you are
-making a new test, you can pass `--bless` to the test subcommand. E.g.
-if some tests in `src/test/ui` are failing, you can run
-
-```text
-./x.py test --stage 1 src/test/ui --bless
-```
-
-to automatically adjust the `.stderr`, `.stdout` or `.fixed` files of
-all tests. Of course you can also target just specific tests with the
-`--test-args your_test_name` flag, just like when running the tests.
-
 ### Normalization
 
 The normalization applied is aimed at eliminating output difference
diff --git a/src/doc/rustc-dev-guide/src/tests/running.md b/src/doc/rustc-dev-guide/src/tests/running.md
index 4a86d2cce8b..f5d8cbdbd03 100644
--- a/src/doc/rustc-dev-guide/src/tests/running.md
+++ b/src/doc/rustc-dev-guide/src/tests/running.md
@@ -108,6 +108,20 @@ Under the hood, the test runner invokes the standard rust test runner
 filtering for tests that include "issue-1234" in the name. (Thus
 `--test-args` is a good way to run a collection of related tests.)
 
+## Editing and updating the reference files
+
+If you have changed the compiler's output intentionally, or you are
+making a new test, you can pass `--bless` to the test subcommand. E.g.
+if some tests in `src/test/ui` are failing, you can run
+
+```text
+./x.py test --stage 1 src/test/ui --bless
+```
+
+to automatically adjust the `.stderr`, `.stdout` or `.fixed` files of
+all tests. Of course you can also target just specific tests with the
+`--test-args your_test_name` flag, just like when running the tests.
+
 ## Passing `--pass $mode`
 
 Pass UI tests now have three modes, `check-pass`, `build-pass` and