diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-01 13:39:49 +0200 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2019-10-01 08:39:48 -0300 |
| commit | f2ef7e8199d91214c79c42753d6340c86b8ba6e7 (patch) | |
| tree | a23d8ee937856c75e070ece9b9ad3ef6aec54bef /src/doc/rustc-dev-guide | |
| parent | e644c6c6008bf45340e41e88965123fa0309df6b (diff) | |
| download | rust-f2ef7e8199d91214c79c42753d6340c86b8ba6e7.tar.gz rust-f2ef7e8199d91214c79c42753d6340c86b8ba6e7.zip | |
issues/issue-12345.rs is an anti-pattern (#456)
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/tests/adding.md | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/doc/rustc-dev-guide/src/tests/adding.md b/src/doc/rustc-dev-guide/src/tests/adding.md index a660d26b56d..8492cbbcc92 100644 --- a/src/doc/rustc-dev-guide/src/tests/adding.md +++ b/src/doc/rustc-dev-guide/src/tests/adding.md @@ -49,12 +49,13 @@ considered an ideal setup. [`src/test/ui`]: https://github.com/rust-lang/rust/tree/master/src/test/ui/ For regression tests – basically, some random snippet of code that -came in from the internet – we often just name the test after the -issue. For example, `src/test/ui/issue-12345.rs`. If possible, -though, it is better if you can put the test into a directory that -helps identify what piece of code is being tested here (e.g., -`borrowck/issue-12345.rs` is much better), or perhaps give it a more -meaningful name. Still, **do include the issue number somewhere**. +came in from the internet – we often name the test after the issue +plus a short description. Ideally, the test should be added to a +directory that helps identify what piece of code is being tested here +(e.g., `src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.rs`) +If you've tried and cannot find a more relevant place, +the test may be added to `src/test/ui/issues/`. +Still, **do include the issue number somewhere**. When writing a new feature, **create a subdirectory to store your tests**. For example, if you are implementing RFC 1234 ("Widgets"), |
