]> git.lizzy.rs Git - rust.git/commit
Auto merge of #49349 - Zoxc:sync-errors, r=michaelwoerister
authorbors <bors@rust-lang.org>
Wed, 18 Apr 2018 08:29:14 +0000 (08:29 +0000)
committerbors <bors@rust-lang.org>
Wed, 18 Apr 2018 08:29:14 +0000 (08:29 +0000)
commitf4bb956278e395a34b416d5a3ef03044777625ef
treef81d42d2dcd0f62eeb261f55841e9431866ea4f1
parent23561c6747b0916e852aaa2a5d04c0b0eeddc6de
parente5fc06da8a3b91c8787a6395722e551550161cff
Auto merge of #49349 - Zoxc:sync-errors, r=michaelwoerister

Make Handler more thread-safe

The use of `code_emitted` to suppress extended explanations is not thread safe. I'm not sure why we keep the documentation for errors outside `diagnostics.rs` anyway. It would be better to add a `teach` method to `DiagnosticsBuilder`, so instead of:
```
if self.tcx.sess.teach(&err.get_code().unwrap()) {
    err.note("...");
}
```
we'd use `err.teach("...")`

cc @estebank

r? @michaelwoerister