Skip to content

Higher ranked trivial bounds are not checked #50935

Description

@leoyvens

As can be seen in the example:

trait Trait {}
// Checked
fn foo() where i32 : Trait {}
// Not checked.
fn bar() where for<'a> fn(&'a ()) : Trait {}

In light of #2056 this will become just a lint, but still we should lint in both cases rather than just the first. This would be fixed by having well-formedness not ignore higher-ranked predicates. See #50815 for an attempted fix which resulted in too many regressions, probably for other bugs in handling higher-ranked stuff. We can try revisiting this after more chalkification.

Activity

  1. added
    C-enhancementCategory: An issue proposing an enhancement or a PR with one.
    on Oct 2, 2018
  2. leoyvens commented on Apr 20, 2020

    @leoyvens
    ContributorAuthor

    Triage: Situation unchanged.

  3. added
    T-typesRelevant to the types team, which will review and decide on the PR/issue.
    S-types-trackedStatus: Being actively tracked by the types team
    and removed on Jun 24, 2022
  4. added
    A-higher-rankedArea: Higher-ranked things (e.g., lifetimes, types, trait bounds aka HRTBs)
    on Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

A-higher-rankedArea: Higher-ranked things (e.g., lifetimes, types, trait bounds aka HRTBs)A-trait-systemArea: Trait systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.S-types-trackedStatus: Being actively tracked by the types teamT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions