rust/src/test
bors 6fe23719fe Auto merge of #38914 - est31:tidy-gate-tests, r=nikomatsakis
Make tidy check for lang gate tests

Add gate tests to the checks that tidy performs. Excerpt from the commit message of the main commit:

    Require compile-fail tests for new lang features

    Its non trivial to test lang feature gates, and people
    forget to add such tests. So we extend the features lint
    of the tidy tool to ensure that all new lang features
    contain a new compile-fail test.

    Of course, one could drop this requirement and just
    grep all tests in run-pass for #![feature(abc)] and
    then run this test again, removing the mention,
    requiring that it fails.

    But this only tests for the existence of a compilation
    failure. Manual tests ensure that also the correct lines
    spawn the error, and also test the actual error message.

    For library features, it makes no sense to require such
    a test, as here code is used that is generic for all
    library features.

The tidy lint extension now checks the compile-fail test suite for occurences of "gate-test-X" where X is a feature. Alternatively, it also accepts file names with the form "feature-gate-X.rs". If a lang feature is found that has no such check, we emit a tidy error.

I've applied the markings to all tests I could find in the test suite. I left a small (20 elements) whitelist of features that right now have no gate test, or where I couldn't find one. Once this PR gets merged, I'd like to close issue #22820 and open a new one on suggestion of @nikomatsakis to track the removal of all elements from that whitelist (already have a draft). Writing such a small test can be a good opportunity for a first contribution, so I won't touch it (let others have the fun xD).

cc @brson , @pnkfelix (they both discussed about this in the issue linked above).
2017-01-14 06:43:03 +00:00
..
codegen Replace BlockAndBuilder with Builder. 2017-01-04 11:33:31 -07:00
codegen-units Fix fallout in tests. 2016-09-27 06:43:51 +00:00
compile-fail Auto merge of #38914 - est31:tidy-gate-tests, r=nikomatsakis 2017-01-14 06:43:03 +00:00
compile-fail-fulldeps resolve: Do not use "resolve"/"resolution" in error messages 2017-01-12 10:08:27 +03:00
debuginfo Auto merge of #38473 - zackmdavis:issue_kebab, r=sanxiyn 2017-01-03 09:42:22 +00:00
incremental ICH: Add some more test cases for trait impls. 2017-01-05 10:53:29 -05:00
mir-opt Auto merge of #38332 - bluss:copy-prop-arguments, r=eddyb 2016-12-14 06:26:21 +00:00
parse-fail Fix parse-fail and compile-fail tests 2016-12-30 15:17:26 +01:00
pretty Pretty-print $crate::foo::bar as ::foo::bar. 2016-12-22 06:14:36 +00:00
run-fail Warn when a #[should_panic] test has an unexpected message 2016-11-18 21:01:19 +10:30
run-fail-fulldeps Fix fallout in rustdoc and tests. 2016-11-21 12:16:46 +00:00
run-make Auto merge of #38783 - alexcrichton:stabilize-proc-macro, r=nikomatsakis 2017-01-04 20:06:21 +00:00
run-pass Auto merge of #38675 - infinity0:more-jemalloc-fixes, r=alexcrichton 2017-01-13 00:56:45 +00:00
run-pass-fulldeps rustc: Stabilize the proc_macro feature 2017-01-02 12:13:30 -08:00
run-pass-valgrind Fix some pretty printing tests 2016-10-18 23:23:40 +03:00
rustdoc Improved rustdoc rendering for unstable features 2017-01-09 21:50:00 -08:00
ui Auto merge of #38890 - petrochenkov:noresolve, r=nrc 2017-01-13 16:59:25 +00:00