]> git.lizzy.rs Git - rust.git/commit
Auto merge of #50541 - QuietMisdreavus:rustdoc-errors, r=GuillaumeGomez
authorbors <bors@rust-lang.org>
Wed, 16 May 2018 01:43:26 +0000 (01:43 +0000)
committerbors <bors@rust-lang.org>
Wed, 16 May 2018 01:43:26 +0000 (01:43 +0000)
commit3c31e17ddc8914365145683e6d56fa0229a01a8e
tree3a8e44a25eaff5e2a9df14d9aa83dd717e61ed18
parente44fc6c52d9674ed09958512e3bf09bc55bccecf
parentc3fd12ff4e88321904e4e28949945c23f399da57
Auto merge of #50541 - QuietMisdreavus:rustdoc-errors, r=GuillaumeGomez

rustdoc: replace most (e)println! statements with structured warnings/errors

Turns out, the rustc diagnostic handler doesn't need a whole lot of setup that we weren't already doing. For errors that occur outside a "dealing with source code" context, we can just use the format/color config we were already parsing and make up a `Handler` that we can emit structured warnings/errors from. So i did that. This will make it way easier to test things with `rustdoc-ui` tests, since those require the JSON error output. (In fact, this PR is a yak shave for a different one where i was trying to do just that. `>_>`)
src/librustdoc/lib.rs