rust/src/test
bors 088d417852 Auto merge of #33593 - dotdash:smart_derive, r=brson
Improve derived implementations for enums with lots of fieldless variants

A number of trait methods like PartialEq::eq or Hash::hash don't
actually need a distinct arm for each variant, because the code within
the arm only depends on the number and types of the fields in the
variants. We can easily exploit this fact to create less and better
code for enums with multiple variants that have no fields at all, the
extreme case being C-like enums.

For nickel.rs and its by now infamous 800 variant enum, this reduces
optimized compile times by 25% and non-optimized compile times by 40%.
Also peak memory usage is down by almost 40% (310MB down to 190MB).

To be fair, most other crates don't benefit nearly as much, because
they don't have as huge enums. The crates in the Rust distribution that
I measured saw basically no change in compile times (I only tried
optimized builds) and only 1-2% reduction in peak memory usage.
2016-05-14 22:04:58 -07:00
..
codegen rustc: Implement custom panic runtimes 2016-05-09 08:22:36 -07:00
codegen-units trans: Make collector handle the drop_in_place() intrinsic. 2016-05-11 14:30:33 -04:00
compile-fail Auto merge of #33169 - swgillespie:issue32829, r=eddyb 2016-05-11 19:48:54 -07:00
compile-fail-fulldeps s/aux/auxiliary, because windows 2016-05-06 16:24:48 -04:00
debuginfo s/aux/auxiliary, because windows 2016-05-06 16:24:48 -04:00
incremental Fix test cases to reflect that #32014...went away 2016-04-06 16:38:29 -04:00
parse-fail Rollup merge of #33336 - birkenfeld:issue-27361, r=sfackler 2016-05-07 15:35:17 -04:00
pretty Fix fallout in tests 2016-03-30 22:00:48 +00:00
run-fail Add #[rustc_no_mir] to make tests pass with -Z orbit. 2016-03-17 22:48:07 +02:00
run-fail-fulldeps Improve error message for let-in-expr-position 2016-01-26 13:55:46 +05:30
run-make Auto merge of #33538 - Ms2ger:LocalCrateReader, r=arielb1 2016-05-13 23:34:52 -07:00
run-pass Rollup merge of #33572 - nagisa:assoc-const-types, r=eddyb 2016-05-14 11:57:48 +02:00
run-pass-fulldeps Improve derived implementations for enums with lots of fieldless variants 2016-05-12 21:05:13 +02:00
run-pass-valgrind Add #[rustc_no_mir] to make tests pass with -Z orbit. 2016-03-17 22:48:07 +02:00
rustdoc rustdoc: Fix missing type parameters on impls 2016-05-12 20:08:33 +01:00