Skip to content

Commit bda375e

Browse files
Centrilmark-i-m
authored andcommitted
issues/issue-12345.rs is an anti-pattern (rust-lang#456)
1 parent 26c3dbf commit bda375e

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/tests/adding.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@ considered an ideal setup.
4949
[`src/test/ui`]: https://github.com/rust-lang/rust/tree/master/src/test/ui/
5050

5151
For regression tests – basically, some random snippet of code that
52-
came in from the internet – we often just name the test after the
53-
issue. For example, `src/test/ui/issue-12345.rs`. If possible,
54-
though, it is better if you can put the test into a directory that
55-
helps identify what piece of code is being tested here (e.g.,
56-
`borrowck/issue-12345.rs` is much better), or perhaps give it a more
57-
meaningful name. Still, **do include the issue number somewhere**.
52+
came in from the internet – we often name the test after the issue
53+
plus a short description. Ideally, the test should be added to a
54+
directory that helps identify what piece of code is being tested here
55+
(e.g., `src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.rs`)
56+
If you've tried and cannot find a more relevant place,
57+
the test may be added to `src/test/ui/issues/`.
58+
Still, **do include the issue number somewhere**.
5859

5960
When writing a new feature, **create a subdirectory to store your
6061
tests**. For example, if you are implementing RFC 1234 ("Widgets"),

0 commit comments

Comments
 (0)