Add required `error` method to `Decoder`

Since rustc pull #16130 there has been a new method in the `Decoder`
trait for signalling application-specific decode errors.
This probably wants to be `self.cur_field.clone()` to make sure it gets attached to the right field.