<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/alloc/src/collections/vec_deque/tests.rs, branch 1.52.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.52.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.52.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2021-03-17T23:02:07+00:00</updated>
<entry>
<title>Fix overflowing length in Vec&lt;ZST&gt; to VecDeque</title>
<updated>2021-03-17T23:02:07+00:00</updated>
<author>
<name>Josh Stone</name>
<email>jistone@redhat.com</email>
</author>
<published>2021-03-17T23:02:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c07955c6b6a8901fc59d9c22004127b30a965407'/>
<id>urn:sha1:c07955c6b6a8901fc59d9c22004127b30a965407</id>
<content type='text'>
`Vec` can hold up to `usize::MAX` ZST items, but `VecDeque` has a lower
limit to keep its raw capacity as a power of two, so we should check
that in `From&lt;Vec&lt;T&gt;&gt; for VecDeque&lt;T&gt;`. We can also simplify the
capacity check for the remaining non-ZST case.

Before this fix, the new test would fail on the length:

```
thread 'collections::vec_deque::tests::test_from_vec_zst_overflow' panicked at 'assertion failed: `(left == right)`
  left: `0`,
 right: `9223372036854775808`', library/alloc/src/collections/vec_deque/tests.rs:474:5
note: panic did not contain expected string
      panic message: `"assertion failed: `(left == right)`\n  left: `0`,\n right: `9223372036854775808`"`,
 expected substring: `"capacity overflow"`
```

That was a result of `len()` using a mask `&amp; (size - 1)` with the
improper length. Now we do get a "capacity overflow" panic as soon as
that `VecDeque::from(vec)` is attempted.
</content>
</entry>
<entry>
<title>Avoid hash_slice in VecDeque's Hash implementation</title>
<updated>2021-01-18T16:56:06+00:00</updated>
<author>
<name>Konrad Borowski</name>
<email>konrad@borowski.pw</email>
</author>
<published>2021-01-18T16:56:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ae3a5153377f2271ba7dfe686a9b5bca1632c32b'/>
<id>urn:sha1:ae3a5153377f2271ba7dfe686a9b5bca1632c32b</id>
<content type='text'>
Fixes #80303.
</content>
</entry>
<entry>
<title>Add another test case for #79808</title>
<updated>2021-01-11T03:10:16+00:00</updated>
<author>
<name>Yuki Okushi</name>
<email>huyuumi.dev@gmail.com</email>
</author>
<published>2021-01-11T03:10:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=39e1331cfabeef842081c599bebb6c10042008e7'/>
<id>urn:sha1:39e1331cfabeef842081c599bebb6c10042008e7</id>
<content type='text'>
Taken from #80293.
</content>
</entry>
<entry>
<title>fix unsoundness in `make_contiguous`</title>
<updated>2020-12-08T09:34:31+00:00</updated>
<author>
<name>Bastian Kauschke</name>
<email>bastian_kauschke@hotmail.de</email>
</author>
<published>2020-12-08T09:34:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4fb9f1d7846f64beeec749db5933a24c05456ff2'/>
<id>urn:sha1:4fb9f1d7846f64beeec749db5933a24c05456ff2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>make some vec_deque tests less exhaustive in Miri</title>
<updated>2020-07-31T09:56:08+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2020-07-31T08:21:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0a62b7dc92978b03150f58db0dd15f98069ad44e'/>
<id>urn:sha1:0a62b7dc92978b03150f58db0dd15f98069ad44e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mv std libs to library/</title>
<updated>2020-07-28T00:51:13+00:00</updated>
<author>
<name>mark</name>
<email>markm@cs.wisc.edu</email>
</author>
<published>2020-06-12T02:31:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2c31b45ae878b821975c4ebd94cc1e49f6073fd0'/>
<id>urn:sha1:2c31b45ae878b821975c4ebd94cc1e49f6073fd0</id>
<content type='text'>
</content>
</entry>
</feed>
