Skip to content

feat: Properly handle lifetimes when checking generic arguments len #19676

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

Merged
merged 1 commit into from
Apr 24, 2025

Conversation

ChayimFriedman2
Copy link
Contributor

@ChayimFriedman2 ChayimFriedman2 commented Apr 24, 2025

And also, prepare for correct lowering of lifetime. We still don't handle most lifetimes correctly, but a bit more of the foundation to lifetime elision is now implemented.

This is the "proper" fix for #19668. #19672 fixed it in the "quick-and-dirty" way.

rustc does this all differently by inserting the lifetimes in late resolution (which is why my code originally did not work correctly). We can't do this. But I did follow rustc's late resolve closely when implementing this.

This also adds two new diagnostics.

And also, prepare for correct lowering of lifetime. We still don't handle most lifetimes correctly, but a bit more of the foundation to lifetime elision is now implemented.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 24, 2025
@Veykril Veykril added this pull request to the merge queue Apr 24, 2025
Merged via the queue into rust-lang:master with commit 8fb2dcc Apr 24, 2025
14 checks passed
@ChayimFriedman2 ChayimFriedman2 deleted the lifetimes branch April 24, 2025 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants