Closed
Description
openedon Sep 12, 2017
Update for 2022: With the FCP close finished, this is no longer on a stabilization path, and will likely be removed from nightly. The issue will remain open so long as it's referenced by an implemented feature
in the compiler, however.
This is a tracking issue for the RFC "In-band lifetime bindings" (rust-lang/rfcs#2115).
Steps:
- Stabilize
'_
(this has its own tracking issue, Tracking issue for'_
#48469) -
Tracking issue for lifetime elision for impl headers (feature impl_header_lifetime_elision) #15872: Enable elision in impl headers (mentoring instructions here)- Now tracked by
impl_header_lifetime_elision
in Tracking issue for lifetime elision for impl headers (feature impl_header_lifetime_elision) #15872
- Now tracked by
- enable elision in where-clauses on functions #45667: Support
'_
in where-clauses on functions. -- blocked on Tracking issue for lifetime elision for impl headers (feature impl_header_lifetime_elision) #15872 - in-band lifetimes: enable implicit binders #46042: Enable implicit binders.
- Lint against single-letter lifetimes not confined to functions (?)
- Lint against single-use lifetimes: In-band lifetimes: Lint against single-use lifetime names #44752
- Apply to rustc, experimenting with naming conventions (e.g., working through the affect on rustc).
- Adjust documentation (see instructions on forge)
- Stabilization PR (see instructions on forge)
Unresolved questions:
- What conventions should we use for lifetime names, and should they be enforced via lint?
- Considerations:
- To help avoiding accidental shadowing, make it easy to know where a lifetime name is bound (and in particular if it is bound in some enclosing, possibly out-of-sight, scope).
- Permitting "well-known" names like
'tcx
and'gcx
to be used consistently
- Some prior proposals:
- Names bound in impls are upper-case (but: fails to permit well-known names)
- Single-letter names cannot be bound across scopes (but: can't easily tell if longer names are bound across scopes or not)
- Considerations:
Can we find an unequivocally-better syntax than'_
for elided lifetimes?- These are now stable, so we didn't
Known bugs (possibly incomplete list):
Metadata
Assignees
Labels
Area: Lifetimes / regionsBlocker: Approved by a merged RFC but not yet implemented.Category: An issue tracking the progress of sth. like the implementation of an RFCCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Status: There are blocking design concerns.Relevant to the compiler team, which will review and decide on the PR/issue.Relevant to the language team, which will review and decide on the PR/issue.This PR / issue is in PFCP or FCP with a disposition to close it.The final comment period is finished for this PR / Issue.
Activity