rust/src/test
Aaron Hill 6e466efa11
Cache pretty-print/retokenize result to avoid compile time blowup
Fixes #79242

If a `macro_rules!` recursively builds up a nested nonterminal
(passing it to a proc-macro at each step), we will end up repeatedly
pretty-printing/retokenizing the same nonterminals. Unfortunately, the
'probable equality' check we do has a non-trivial cost, which leads to a
blowup in compilation time.

As a workaround, we cache the result of the 'probable equality' check,
which eliminates the compilation time blowup for the linked issue. This
commit only touches a single file (other than adding tests), so it
should be easy to backport.

The proper solution is to remove the pretty-print/retokenize hack
entirely. However, this will almost certainly break a large number of
crates that were relying on hygiene bugs created by using the reparsed
`TokenStream`. As a result, we will definitely not want to backport
such a change.
2020-11-23 02:40:57 -05:00
..
assembly
auxiliary
codegen Never inline naked functions 2020-11-20 00:00:00 +00:00
codegen-units simplify-locals: Remove unused assignments regardless of rvalue kind 2020-10-26 10:48:28 +01:00
compile-fail change error for LayoutErr::SizeOverflow 2020-11-18 11:38:30 +01:00
debuginfo Auto merge of #78461 - TimDiekmann:vec-alloc, r=Amanieu 2020-11-21 22:46:50 +00:00
incremental Remove FIXME comment from incremental 2020-11-20 21:33:48 +09:00
mir-opt Auto merge of #78088 - fusion-engineering-forks:panic-fmt-lint, r=estebank 2020-11-20 03:40:20 +00:00
pretty fix pretty print for qpath 2020-11-12 12:47:25 +01:00
run-make Auto merge of #76256 - tgnottingham:issue-74890, r=nikomatsakis 2020-11-12 15:34:09 +00:00
run-make-fulldeps Fix and re-enable two coverage tests on MacOS 2020-11-11 22:54:58 -08:00
run-pass-valgrind Add unsized_fn_params feature 2020-10-27 14:45:02 -03:00
rustdoc Auto merge of #78461 - TimDiekmann:vec-alloc, r=Amanieu 2020-11-21 22:46:50 +00:00
rustdoc-js
rustdoc-js-std
rustdoc-ui x.py test --bless 2020-11-21 11:08:58 -05:00
rustfix
ui Cache pretty-print/retokenize result to avoid compile time blowup 2020-11-23 02:40:57 -05:00
ui-fulldeps Revert "Auto merge of #79132 - pietroalbini:beta-next, r=Mark-Simulacrum" 2020-11-18 11:18:40 +01:00
COMPILER_TESTS.md