Skip to content

Check the bounds in impls against concrete types #16955

Closed
@nrc

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).

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