<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_serialize/src/collection_impls.rs, branch 1.60.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.60.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.60.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2022-01-21T23:38:31+00:00</updated>
<entry>
<title>Make `Decodable` and `Decoder` infallible.</title>
<updated>2022-01-21T23:38:31+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2022-01-18T02:22:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=416399dc1028545ea0ac6d68fb0b5cc5fa97d393'/>
<id>urn:sha1:416399dc1028545ea0ac6d68fb0b5cc5fa97d393</id>
<content type='text'>
`Decoder` has two impls:
- opaque: this impl is already partly infallible, i.e. in some places it
  currently panics on failure (e.g. if the input is too short, or on a
  bad `Result` discriminant), and in some places it returns an error
  (e.g. on a bad `Option` discriminant). The number of places where
  either happens is surprisingly small, just because the binary
  representation has very little redundancy and a lot of input reading
  can occur even on malformed data.
- json: this impl is fully fallible, but it's only used (a) for the
  `.rlink` file production, and there's a `FIXME` comment suggesting it
  should change to a binary format, and (b) in a few tests in
  non-fundamental ways. Indeed #85993 is open to remove it entirely.

And the top-level places in the compiler that call into decoding just
abort on error anyway. So the fallibility is providing little value, and
getting rid of it leads to some non-trivial performance improvements.

Much of this commit is pretty boring and mechanical. Some notes about
a few interesting parts:
- The commit removes `Decoder::{Error,error}`.
- `InternIteratorElement::intern_with`: the impl for `T` now has the same
  optimization for small counts that the impl for `Result&lt;T, E&gt;` has,
  because it's now much hotter.
- Decodable impls for SmallVec, LinkedList, VecDeque now all use
  `collect`, which is nice; the one for `Vec` uses unsafe code, because
  that gave better perf on some benchmarks.
</content>
</entry>
<entry>
<title>Remove unused functions and arguments from rustc_serialize</title>
<updated>2021-06-01T17:29:11+00:00</updated>
<author>
<name>bjorn3</name>
<email>bjorn3@users.noreply.github.com</email>
</author>
<published>2021-06-01T17:12:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a2c4affe860ec53647b902f257e7e575f0350854'/>
<id>urn:sha1:a2c4affe860ec53647b902f257e7e575f0350854</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustc_serialize: specialize opaque decoding of some u8 sequences</title>
<updated>2021-01-02T06:49:16+00:00</updated>
<author>
<name>Tyson Nottingham</name>
<email>tgnottingham@gmail.com</email>
</author>
<published>2020-12-17T05:03:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=be79f493fb310b3a6b01ceada32713813bb12a91'/>
<id>urn:sha1:be79f493fb310b3a6b01ceada32713813bb12a91</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustc_serialize: specialize opaque encoding of some u8 sequences</title>
<updated>2021-01-02T06:49:14+00:00</updated>
<author>
<name>Tyson Nottingham</name>
<email>tgnottingham@gmail.com</email>
</author>
<published>2020-12-17T03:03:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a4daa63a90f46e3c6e36efe5e0743eab09f6f12b'/>
<id>urn:sha1:a4daa63a90f46e3c6e36efe5e0743eab09f6f12b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mv compiler to compiler/</title>
<updated>2020-08-30T15:45:07+00:00</updated>
<author>
<name>mark</name>
<email>markm@cs.wisc.edu</email>
</author>
<published>2020-08-28T03:58:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9e5f7d5631b8f4009ac1c693e585d4b7108d4275'/>
<id>urn:sha1:9e5f7d5631b8f4009ac1c693e585d4b7108d4275</id>
<content type='text'>
</content>
</entry>
</feed>
