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

Fix "higher kinded" -> "higher ranked" in RFC 3498 #3590

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

traviscross
Copy link
Contributor

@traviscross traviscross commented Mar 19, 2024

In RFC 3498 "Lifetime Capture Rules 2024" we specify that lifetime parameters from for<..> binders are captured under the rules.

Currently opaque types in Rust do not support capturing these. In early drafts of the document, we had called the missing feature "higher ranked lifetime bounds on nested opaque types". However, we had then noticed that the relevant error message in rustc called these "higher kinded" instead:

error: higher kinded lifetime bounds on nested opaque types are not supported yet

We changed later drafts to follow that language. But that language was wrong. These are definitely "higher ranked" lifetime bounds, not "higher kinded" ones, whatever that might mean. We've now fixed the error message emitted by rustc in:

Correspondingly, let's now fix this error in the RFC.

Rendered

cc @oli-obk @compiler-errors

In RFC 3498 "Lifetime Capture Rules 2024" we specify that lifetime
parameters from `for<..>` binders are captured under the rules.

Currently opaque types in Rust do not support capturing these.  In
early drafts of the document, we had called the missing feature
"higher ranked lifetime bounds on nested opaque types".  However, we
had then noticed that the relevant error message in `rustc` called
these "higher kinded" instead:

> error: higher kinded lifetime bounds on nested opaque types are not
> supported yet

We changed later drafts to follow that language.  But that language
was wrong.  These are definitely "higher ranked" lifetime bounds, not
"higher kinded" ones, whatever that might mean.  We've now fixed the
error message emitted by `rustc` in:

- rust-lang/rust#122100

Correspondingly, let's now fix this error in the RFC.
@traviscross traviscross added the not-rfc For PRs that fix things like spelling mistakes, wrong file names, etc. label Mar 19, 2024
Copy link
Member

@fmease fmease left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning this up! 🙏 Higher ranked is definitely the correct term here.

A higher kinded lifetime bound would be something of kind K -> Constraint with K in Type, Region or Const, haha, if we assume an outlives-bound. E.g., a higher-kinded B where B<'a> normalizes to outlives-bound 'a: 'b with lifetime 'a variable, 'b fixed or a higher-kinded P where P<T> normalizes to outlives-bound T: 'a with T variable, 'a fixed.

@fmease fmease merged commit 6591585 into master Mar 19, 2024
@fmease fmease deleted the TC/fix-higher-ranked-not-higher-kinded branch March 19, 2024 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-rfc For PRs that fix things like spelling mistakes, wrong file names, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants