Skip to content

Check the bounds in impls against concrete types #16955

Description

@nrc

E.g., impl<X: ...> Trait<X> for Struct<X> { ... } we check the bounds of X satisfy the bounds given by Trait, but not those given by Struct. I don't think this is a soundness issue (because any use of X is limited to the impl and relies on the given bounds, not the bounds given by Struct), but it is a bit odd and not the behaviour I would expect, especially given RFC 11 (https://github.com/rust-lang/rfcs/blob/master/active/0011-bounded-type-parameters.md).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions