about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-12-22 13:49:10 +0000
committerbors <bors@rust-lang.org>2018-12-22 13:49:10 +0000
commitfa922ab876cb3140de2ead9c8ad88a75982c167c (patch)
tree448be2134239f359ba139ae046937cefdfafd362 /src/libstd/sys
parent9966590422ed3e6bd97bc1967b7435a03cfb949b (diff)
parentf93cbf617000673e5ad2fc0fd0eff0c9ea229314 (diff)
downloadrust-fa922ab876cb3140de2ead9c8ad88a75982c167c.tar.gz
rust-fa922ab876cb3140de2ead9c8ad88a75982c167c.zip
Auto merge of #57060 - nikic:inhabit-perf-2, r=varkor
Short-circuit DefIdForest::intersection()

If the forest is already empty, there is no point in intersecting further.

Also handle the first element separately, so we don't compute an unnecessary intersection between the full forest and the first element, which is always equal to the first element.

This is the second try at fixing #57028, as the previous attempt only recovered part of the regression. I checked locally that this drops time spent in ty::inhabitedness for syn-check a lot, though not to zero.

r? @varkor
Diffstat (limited to 'src/libstd/sys')
0 files changed, 0 insertions, 0 deletions