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

Higher ranked trivial bounds are not checked #50935

Open
leoyvens opened this issue May 21, 2018 · 1 comment
Open

Higher ranked trivial bounds are not checked #50935

leoyvens opened this issue May 21, 2018 · 1 comment
Assignees
Labels
A-traits Area: Trait system C-enhancement Category: An issue proposing an enhancement or a PR with one. S-types-tracked Status: Being actively tracked by the types team T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.

Comments

@leoyvens
Copy link
Contributor

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.

@leoyvens leoyvens added A-traits Area: Trait system T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-traits Working group: Traits, https://internals.rust-lang.org/t/announcing-traits-working-group/6804 labels May 21, 2018
@XAMPPRocky XAMPPRocky added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Oct 2, 2018
@leoyvens
Copy link
Contributor Author

Triage: Situation unchanged.

@jackh726 jackh726 added T-types Relevant to the types team, which will review and decide on the PR/issue. S-types-tracked Status: Being actively tracked by the types team and removed WG-traits Working group: Traits, https://internals.rust-lang.org/t/announcing-traits-working-group/6804 labels Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-traits Area: Trait system C-enhancement Category: An issue proposing an enhancement or a PR with one. S-types-tracked Status: Being actively tracked by the types team T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants