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

feat!(blanket_impls): impl Diagnostic for &T and Box<T> #367

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

Commits on Apr 23, 2024

  1. feat!(blanket_impls): impl Diagnostic for &T and Box<T>

    Brings things in line with best practices as described in "Rust for
    Rustaceans" when it comes to "Ergonomic Trait Implementations" in Chapter
    3. Practically means that people can pass more types to any functions
    taking either `dyn Diagnostic` or `impl Diagnostic`.
    
    BREAKING CHANGE: Added blanket impls may overlap with manual user impls.
    If these impls are just hacks to achieve the same as the blanket ones do,
    then they can simply be removed. If the impls for `T` and `&T` differ
    semantically, then the user would need to employ the newtype pattern to
    avoid overlap.
    TheLostLambda committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    a8cb8fa View commit details
    Browse the repository at this point in the history