]> git.lizzy.rs Git - rust.git/commit
Drop "solved" constraints during region expansion
authorBjörn Steinbrink <bsteinbr@gmail.com>
Wed, 9 Jan 2019 17:40:30 +0000 (18:40 +0100)
committerBjörn Steinbrink <bsteinbr@gmail.com>
Thu, 10 Jan 2019 19:10:11 +0000 (20:10 +0100)
commit07600c939b594b39f560bc969caca2e92498435a
treeebb6e2ac2d31f3a72a507541bebc6cf6ed576274
parent664c7797f6bfddf9f5e67474c2fd8017f91d7110
Drop "solved" constraints during region expansion

Once a region has been expanded to cover a fixed region, a corresponding
RegSubVar constraint won't have any effect on the expansion anymore, the
same is true for constraints where the variable on the RHS has already
reached static scope. By removing those constraints from the set that
we're iterating over, we remove a lot of needless overhead in case of
slow convergences (i.e. lots of iterations).

For the unicode_normalization crate, this about cuts the time required
for item_bodies checking in half.
src/librustc/infer/lexical_region_resolve/mod.rs