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

Remove redundant lifetime bound from impl Borrow for Cow #99578

Merged
merged 1 commit into from
Oct 24, 2022

Commits on Jul 21, 2022

  1. Remove redundant lifetime bound from impl Borrow for Cow

    The lifetime bound `B::Owned: 'a` is redundant and doesn't make a difference,
    because `Cow<'a, B>` comes with an implicit `B: 'a`, and associated types
    will outlive lifetimes outlived by the `Self` type (and all the trait's
    generic parameters, of which there are none in this case), so the implicit `B: 'a`
    implies `B::Owned: 'a` anyway.
    
    The explicit lifetime bound here does however end up in documentation,
    and that's confusing in my opinion, so let's remove it ^^
    steffahn committed Jul 21, 2022
    Configuration menu
    Copy the full SHA
    c03d10c View commit details
    Browse the repository at this point in the history