rust-lang/rust — pull request #16130 by apoelstra (2014-07-30 23:28:32+00:00)
Title: libserialize: add fail_here() to `Decoder`

A quick and dirty fix for #15036 until we get serious decoder reform.

Right now it is impossible for a `Decodable` to signal a decode error, for example if it has only finitely many allowed values, is a string which must be encoded a certain way, needs a valid checksum, etc. For example in the `libuuid` implementation of `Decodable` an `Option` is unwrapped, meaning that a decode of a malformed UUID will cause the task to fail.