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

Turns out, Report *really* doesn't want to be an Error or Diagnostic... #368

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TheLostLambda
Copy link
Contributor

Failing some context tests, I'm pretty sure because self.wrap_err(msg) creates a context_chain_downcast table, whilst the Report::from_msg(msg, self) that it's impl clashed with only creates at context_downcast.

I messed around and got Rust to segfault, and discovered I was very much in over my head...

I do think it's possible to impl Diagnostic for Report, but there's a lot of internal restructuring that would need to happen, and in the best case, we lose the Into<Report> impl.

As with 90%+ of my issues with Rust nowadays, the stabilization of specialization would solve this (I believe), but that could be ages and ages away still...

Ultimately, this is here if anyone is feeling clever / brave, and it's work thinking about if we're okay losing those From and Into impls for Report, because I don't think there is a clever way around that...

@TheLostLambda
Copy link
Contributor Author

TheLostLambda commented Apr 24, 2024

If we decide this is better than having From and Into, I'll revisit with a couple of new ideas for how to solve the underlying issues, but for now I'll leave it be, since I'm not actually sure losing those From and Intos is worth it...

@TheLostLambda
Copy link
Contributor Author

Very happy to retire this if #371 is merged!

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 this pull request may close these issues.

None yet

1 participant