Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wit-bindgen: Only emit error type impls in one place #7074

Closed
elliottt opened this issue Sep 21, 2023 · 1 comment · Fixed by #7076
Closed

wit-bindgen: Only emit error type impls in one place #7074

elliottt opened this issue Sep 21, 2023 · 1 comment · Fixed by #7076

Comments

@elliottt
Copy link
Member

Feature

When a type is used in an error position in a result in multiple interfaces, it gets an impl std::error::Error definition in each module that it's used in. It should only get a single impl in the module that defines it instead.

Benefit

Error type reuse would be easier between wit interfaces.

@alexcrichton
Copy link
Member

Ah ok I don't think that duplicate impls are generated, just a confusing rustc error message -- this should be fixed by #7075

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants