@@ -66,6 +66,8 @@ directory that helps identify what piece of code is being tested here
6666If you've tried and cannot find a more relevant place,
6767the test may be added to ` src/test/ui/issues/ ` .
6868Still, ** do include the issue number somewhere** .
69+ But please avoid putting your test there as possible since that
70+ directory has too many tests and it causes poor semantic organization.
6971
7072When writing a new feature, ** create a subdirectory to store your
7173tests** . For example, if you are implementing RFC 1234 ("Widgets"),
@@ -391,6 +393,21 @@ and so forth.
391393[ hw-main ] : https://github.com/rust-lang/rust/blob/master/src/test/ui/hello_world/main.rs
392394[ hw ] : https://github.com/rust-lang/rust/blob/master/src/test/ui/hello_world/
393395
396+ We now have a ton of UI tests and some directories have too many entries.
397+ This is a problem because it isn't editor/IDE friendly and GitHub UI won't
398+ show more than 1000 entries. To resolve it and organize semantic structure,
399+ we have a tidy check to ensure the number of entries is less than 1000.
400+ However, since ` src/test/ui ` (UI test root directory) and
401+ ` src/test/ui/issues ` directories have more than 1000 entries,
402+ we set a different limit for each directories. So, please
403+ avoid putting a new test there and try to find a more relevant place.
404+ For example, if your test is related to closures, you should put it in
405+ ` src/test/ui/closures ` . If you're not sure where is the best place,
406+ it's still okay to add to ` src/test/ui/issues/ ` . When you reach the limit,
407+ you could increase it by tweaking [ here] [ ui test tidy ] .
408+
409+ [ ui test tidy ] : https://github.com/rust-lang/rust/blob/master/src/tools/tidy/src/ui_tests.rs
410+
394411### Tests that do not result in compile errors
395412
396413By default, a UI test is expected ** not to compile** (in which case,
0 commit comments