miette/tests
Kat Marchán 3f9da04b86
feat(report): anyhow-ify DiagnosticReport (#35)
This PR overhauls the toplevel/main experience for `miette`. It adds a new `Report` type based on `eyre::Report` and overhauls various types to fit into this model, as well as prepare for some [future changes in Rust](https://github.com/nrc/rfcs/pull/1) that will make it possible to integrate `miette` directly with crates like `eyre` instead of having to use this specific `Report`.

As such, this PR is a major breaking change, especially for anyone using `DiagnosticReport` and company.

BREAKING CHANGES:
* `DiagnosticReport` is now just `Report`, and is a different, `eyre::Report`-like type.
* `DiagnosticResult` is now just `Result`.
* `.into_diagnostic()` now just transforms the error into a `Report`.
* `DiagnosticReportPrinter` has been replaced with `ReportHandler`
* `set_printer` has been replaced by `set_hook`
* `code` is now optional.
* `.into_diagnostic()` no longer takes a `code` argument.
* `#[diagnostic]` is now optional when deriving `Diagnostic`.
2021-09-04 21:22:46 -07:00
..
common feat(report): anyhow-ify DiagnosticReport (#35) 2021-09-04 21:22:46 -07:00
drop feat(report): anyhow-ify DiagnosticReport (#35) 2021-09-04 21:22:46 -07:00
compiletest.rs feat(report): anyhow-ify DiagnosticReport (#35) 2021-09-04 21:22:46 -07:00
derive.rs feat(report): anyhow-ify DiagnosticReport (#35) 2021-09-04 21:22:46 -07:00
narrated.rs feat(report): anyhow-ify DiagnosticReport (#35) 2021-09-04 21:22:46 -07:00
printer.rs feat(report): anyhow-ify DiagnosticReport (#35) 2021-09-04 21:22:46 -07:00
test_autotrait.rs feat(report): anyhow-ify DiagnosticReport (#35) 2021-09-04 21:22:46 -07:00
test_boxed.rs feat(report): anyhow-ify DiagnosticReport (#35) 2021-09-04 21:22:46 -07:00
test_chain.rs feat(report): anyhow-ify DiagnosticReport (#35) 2021-09-04 21:22:46 -07:00
test_context.rs feat(report): anyhow-ify DiagnosticReport (#35) 2021-09-04 21:22:46 -07:00
test_context_access.rs feat(report): anyhow-ify DiagnosticReport (#35) 2021-09-04 21:22:46 -07:00
test_convert.rs feat(report): anyhow-ify DiagnosticReport (#35) 2021-09-04 21:22:46 -07:00
test_downcast.rs feat(report): anyhow-ify DiagnosticReport (#35) 2021-09-04 21:22:46 -07:00
test_fmt.rs feat(report): anyhow-ify DiagnosticReport (#35) 2021-09-04 21:22:46 -07:00
test_location.rs feat(report): anyhow-ify DiagnosticReport (#35) 2021-09-04 21:22:46 -07:00
test_macros.rs feat(report): anyhow-ify DiagnosticReport (#35) 2021-09-04 21:22:46 -07:00
test_repr.rs feat(report): anyhow-ify DiagnosticReport (#35) 2021-09-04 21:22:46 -07:00
test_source.rs feat(report): anyhow-ify DiagnosticReport (#35) 2021-09-04 21:22:46 -07:00