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

"Stabilizable" prototype for expanded const generics #100

Open
4 tasks
nikomatsakis opened this issue Jul 22, 2024 · 9 comments
Open
4 tasks

"Stabilizable" prototype for expanded const generics #100

nikomatsakis opened this issue Jul 22, 2024 · 9 comments

Comments

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Jul 22, 2024

Metadata
Point of contact @BoxyUwU
Team(s) lang, types
Goal document 2025h1/min_generic_const_arguments

Summary

Experiment with a new min_generic_const_args implementation to address challenges found with the existing approach to supporting generic parameters in const generic arguments.

Tasks and status

@nikomatsakis nikomatsakis added this to the 2024h2 milestone Jul 22, 2024
@rust-lang rust-lang locked and limited conversation to collaborators Jul 25, 2024
@nikomatsakis
Copy link
Contributor Author

This issue is intended for status updates only.

For general questions or comments, please contact the owner(s) directly.

@BoxyUwU
Copy link
Member

BoxyUwU commented Jul 28, 2024

Key Developments: #125915 landed which is necessary to start implementation work on min_generic_const_args, a draft outlining the ideas behind the proposed feature has also been written
Blockers: no
Help Wanted: not currently in need of anything

@BoxyUwU
Copy link
Member

BoxyUwU commented Sep 12, 2024

The past ~month has been spent figuring out some implementation constraints arising from DefId creation of anon consts. My time has also been somewhat diverted to other things though that should have cleared up now :-)

@BoxyUwU
Copy link
Member

BoxyUwU commented Oct 5, 2024

camlid has started working on using the new lowering schema for more than just const parameters which once done will allow us to introduce a min_generic_const_args feature gate. compiler-errors has been working on removing the eval_x methods on Const that do not perform proper normalization and are incompatible with this feature

@BoxyUwU
Copy link
Member

BoxyUwU commented Nov 20, 2024

min_generic_const_args now exists as a feature gate (though without any functionality only some gated refactorings), shouldn't be long before it has actual functionality behind it 🤞 The refactoring to remove all the eval_x methods on ty::Const has been completed so it will now be possible to correctly implement normalization for constants.

@BoxyUwU
Copy link
Member

BoxyUwU commented Dec 23, 2024

(nothing this month)

@nikomatsakis nikomatsakis modified the milestones: 2024h2, 2025h1 Feb 18, 2025
@nikomatsakis
Copy link
Contributor Author

This is a continuing project goal, and the updates below this comment will be for the new period 2025h1

@BoxyUwU BoxyUwU marked this as a duplicate of #276 Feb 18, 2025
@nikomatsakis nikomatsakis moved this to Project goals in Lang team features Feb 21, 2025
@BoxyUwU
Copy link
Member

BoxyUwU commented Feb 27, 2025

camelid has a PR up which is ~fully finished + reviewed which enables resolving and lowering all paths under min_generic_const_args. It's taken a while to get this bit finished as we had to take care not to make parts of the compiler unmaintainable by duplicating all the logic for type and const path lowering.

@BoxyUwU
Copy link
Member

BoxyUwU commented Mar 17, 2025

camelids PR has been merged, we now correctly (to the best of my knowledge) lower const paths under mgca. I have a PR open to ensure that we handle evaluation of paths to consts with generics or inference variables correctly, and that we do not attempt to evaluate constants before they have been checked to be well formed. I'm also currently mentoring someone to implement proper handling of normalization of inherent associated constants under mgca.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Project goal
Development

No branches or pull requests

2 participants