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

Use DeBruijn indices for all type-level variables #361

Open
Nadrieril opened this issue Sep 16, 2024 · 0 comments
Open

Use DeBruijn indices for all type-level variables #361

Nadrieril opened this issue Sep 16, 2024 · 0 comments
Assignees

Comments

@Nadrieril
Copy link
Member

A few features involve nested binders:

  • for<'a> clauses and function pointer types;
  • GATs;
  • dyn Trait, which I would like to encode as exists<T> T: Trait<Vars..>;
  • closures, where I'd like to have one binder level per parent (to handle nested closures gracefully);
  • trait methods, where I would like to explicitly separate the parameters from the parents from those of the method; this is ilkely necessary for provided methods.

Today we use binder groups + DeBruijn indices (just like rustc) for lifetime parameters. To support all these features cleanly I would like to do the same for type, const and trait clause parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant