Skip to content

HIR: Move lifetime elision to HIR lowering #28644

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
nrc opened this issue Sep 24, 2015 · 6 comments
Closed

HIR: Move lifetime elision to HIR lowering #28644

nrc opened this issue Sep 24, 2015 · 6 comments
Labels
A-HIR Area: The high-level intermediate representation (HIR)

Comments

@nrc
Copy link
Member

nrc commented Sep 24, 2015

If we can

@nrc nrc added the A-HIR Area: The high-level intermediate representation (HIR) label Sep 24, 2015
@arielb1
Copy link
Contributor

arielb1 commented Sep 24, 2015

@nrc

it is somewhat hard, as elision can occur in type aliases. This of course all depends on moving resolution.

@eddyb
Copy link
Member

eddyb commented Sep 27, 2015

This seems to assume lifetime elision is a syntactical sugar, when it's actually semantic sugar (it depends on lifetimes in definitions of types).

@nrc
Copy link
Member Author

nrc commented Sep 27, 2015

I believe at least some elision is purely syntactic - that could be moved here and the type-dependent stuff left alone. Not sure about the aliases issue.

@jonas-schievink
Copy link
Contributor

This of course all depends on moving resolution.

As far as I can tell, this was done in #33443. Can this now be fully implemented?

@eddyb
Copy link
Member

eddyb commented Jul 17, 2016

@jonas-schievink Hmm, I suppose you can always look at lifetime parameter definitions in custom user types, so this would work. However, the current implementation takes advantage of the Debruijn index representation of late-bound lifetimes to avoid actually touching the lifetime parameter definitions.

@eddyb
Copy link
Member

eddyb commented Mar 8, 2017

#39305 did as much as I thought was reasonable, anything more would really pollute lowering.
@nrc are you happy with that progress, for closing this issue?

@nrc nrc closed this as completed Mar 12, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-HIR Area: The high-level intermediate representation (HIR)
Projects
None yet
Development

No branches or pull requests

4 participants