From 0722dbc40072b8e5a18eb753367e86fdb748f2ec Mon Sep 17 00:00:00 2001 From: Stan Manilov Date: Thu, 10 Apr 2025 16:06:57 +0300 Subject: [PATCH 1/2] Align advice to discourage issue-number-only names https://rustc-dev-guide.rust-lang.org/tests/best-practices.html#test-naming specifically asks devs to "Avoid using only issue numbers as test names". This commit introduces a minor change to https://rustc-dev-guide.rust-lang.org/tests/compiletest.html#crashes-tests that changes the advice to use only issue numbers as names to the advice to append them at the end of the file name. --- src/tests/compiletest.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/compiletest.md b/src/tests/compiletest.md index 2c35381ea..d7c331434 100644 --- a/src/tests/compiletest.md +++ b/src/tests/compiletest.md @@ -565,8 +565,8 @@ $ COMPILETEST_VERBOSE_CRASHES=1 ./x test tests/crashes/999999.rs --stage 1 ``` When adding crashes from , the issue -number should be noted in the file name (`12345.rs` should suffice) and also -inside the file include a `//@ known-bug: #4321` directive. +number should be appended to the end of the file name (e.g. `calling-undefined-fn-12345.rs`). +Also, include a `//@ known-bug: #12345` directive inside the file. If you happen to fix one of the crashes, please move it to a fitting subdirectory in `tests/ui` and give it a meaningful name. Please add a doc From ef6ca3180d0ddc48073b2b36414afc545a441ed7 Mon Sep 17 00:00:00 2001 From: Stan Manilov Date: Thu, 10 Apr 2025 16:09:39 +0300 Subject: [PATCH 2/2] Update compiletest.md Slight rewording without changing the meaning. --- src/tests/compiletest.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tests/compiletest.md b/src/tests/compiletest.md index d7c331434..7b8ca15c0 100644 --- a/src/tests/compiletest.md +++ b/src/tests/compiletest.md @@ -565,8 +565,9 @@ $ COMPILETEST_VERBOSE_CRASHES=1 ./x test tests/crashes/999999.rs --stage 1 ``` When adding crashes from , the issue -number should be appended to the end of the file name (e.g. `calling-undefined-fn-12345.rs`). -Also, include a `//@ known-bug: #12345` directive inside the file. +number should be appended to the end of the file name (e.g. +`calling-undefined-fn-12345.rs`), and a `//@ known-bug: #12345` directive +should be added inside the test file itself. If you happen to fix one of the crashes, please move it to a fitting subdirectory in `tests/ui` and give it a meaningful name. Please add a doc