]> git.lizzy.rs Git - rust.git/commit
Make sure formatter errors are emitted by the default Write::write_fmt
authorUlrik Sverdrup <bluss@users.noreply.github.com>
Fri, 26 Feb 2016 01:53:47 +0000 (02:53 +0100)
committerUlrik Sverdrup <bluss@users.noreply.github.com>
Fri, 26 Feb 2016 01:59:25 +0000 (02:59 +0100)
commit6cfafad3c56736a62e1043a8d01f7f2c74384008
tree51287410608ae9cf04ff019de6c4067d60c4b0a3
parent8842e28be8857e8e37591e2dec469d6720c278cb
Make sure formatter errors are emitted by the default Write::write_fmt

Previously, if an error was returned from the formatter that did not
originate in an underlying writer error, Write::write_fmt would return
successfully even if the formatting did not complete (was interrupted by
an `fmt::Error` return).

Now we choose to emit an io::Error with kind Other for formatter errors.

Since this may reveal error returns from `write!()` and similar that
previously passed silently, it's a kind of a [breaking-change].
src/libstd/io/mod.rs
src/test/run-pass/write-fmt-errors.rs [new file with mode: 0644]