about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2021-10-21 14:11:05 +0900
committerGitHub <noreply@github.com>2021-10-21 14:11:05 +0900
commitd29e98fe93e60b68cf2bfcd62afa50bedfcc0af3 (patch)
treedbae6539d2b86a5fa5f3534ee94ebfecd34a97e7 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
parent20687bb4f151859041aea57029042c0ca6f87d40 (diff)
parent4a37b9cbffdc9ba66e9e4b7a17cb0de157a647f8 (diff)
downloadrust-d29e98fe93e60b68cf2bfcd62afa50bedfcc0af3.tar.gz
rust-d29e98fe93e60b68cf2bfcd62afa50bedfcc0af3.zip
Rollup merge of #90010 - rusticstuff:vecdeque_with_capacity_in_overflow, r=m-ou-se
Avoid overflow in `VecDeque::with_capacity_in()`.

The overflow only happens if alloc is compiled with overflow checks enabled and the passed capacity is greater or equal 2^(usize::BITS-1). The overflow shadows the expected "capacity overflow" panic leading to a test failure if overflow checks are enabled for std in the CI.

Unblocks [CI: Enable overflow checks for test (non-dist) builds #89776](https://github.com/rust-lang/rust/pull/89776).

For some reason the overflow is only observable with optimization turned off, but that is a separate issue.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions