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

Feature Request: implement Diagnostic for &Diagnostic #428

Open
titaniumtraveler opened this issue Mar 12, 2025 · 0 comments
Open

Feature Request: implement Diagnostic for &Diagnostic #428

titaniumtraveler opened this issue Mar 12, 2025 · 0 comments

Comments

@titaniumtraveler
Copy link

I know it would be a breaking change, but I think it should definitely be considered for the next major version.

Please provide a blanked impl for &D: Diagnostic

impl<D: Diagnostic> Diagnostic for &D
{
 // ... trait methods forward to `D`
}

Considering that all methods of Diagnostic take in &self, it would be trivially implementable and is a pattern extensively used by std traits like io::Write or Iterator.

I got the problem factored out of my original use case, but IMO it is still The Right Thing To Do!

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

No branches or pull requests

1 participant