Skip to content

dropck: Ignore bounds for traits without any items #24805

Closed
@pnkfelix

Description

@pnkfelix

As stated in RFC 769, the Drop Check rule is supposed to ignore any trait bounds for traits that do not have associated methods (or perhaps that needs to be strengthened to associated items, as implied by this ticket's title).

However, the current dropck implementation is not so general -- I believe it just hard-codes the set of builtin bounds, rather than allowing any empty trait to be ignored.

This is bad because it complicates e.g. adding OIBIT traits to interfaces, since it can cause the dropck rule to start firing (and for new region constraints to be introduced) that can then cause surprising compilation failures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions