about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-11-12 04:44:30 +0000
committerbors <bors@rust-lang.org>2019-11-12 04:44:30 +0000
commite3d998492abd7d61aba12cfa058fce28c998a3ff (patch)
tree2df921d0afe9c64362a52fa52bf5391f2298e706 /src/libstd/sys/unix/stack_overflow.rs
parente931f00f658b59481925deb0152503038ca69b9e (diff)
parentfd9921b41c4354aaf790c2bc0393f818034100d0 (diff)
downloadrust-e3d998492abd7d61aba12cfa058fce28c998a3ff.tar.gz
rust-e3d998492abd7d61aba12cfa058fce28c998a3ff.zip
Auto merge of #66129 - Nadrieril:refactor-slice-pat-usefulness, r=varkor
Refactor slice pattern usefulness checking

As a follow up to https://github.com/rust-lang/rust/pull/65874, this PR changes how variable-length slice patterns are handled in usefulness checking. The objectives are: cleaning up that code to make it easier to understand, and paving the way to handling fixed-length slices more cleverly too, for https://github.com/rust-lang/rust/issues/53820.

Before this, variable-length slice patterns were eagerly expanded into a union of fixed-length slices. Now they have their own special constructor, which allows expanding them a bit more lazily.
As a nice side-effect, this improves diagnostics.

This PR shows a slight performance improvement, mostly due to https://github.com/rust-lang/rust/pull/66129/commits/149792b6080f40875c0072aae378a0eb31d23df0. This will probably have to be reverted in some way when we implement or-patterns.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions