dtolnay / dtolnay/thiserror

Warn about double-inclusion of error message

Open
#38 2 comments 3 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
5.5k
Forks
213
PR merge metrics
No merged PRs in 30d

Description

I recently cooked up https://github.com/CraneStation/wasmtime/pull/532 which fixed a "double error message" getting printed for errors such as:

```rust
pub enum CompileError {
#[error("WebAssembly translation error: {0}")]
Wasm(#[from] WasmError),
}
```

It'd be great if this crate could somehow issue a diagnostic indicating that there's no need to include the `{0}` in the `#[error]` because it's already rendered in the final error via `#[from]`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.