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

Tracking issue for '_ #48469

Closed
nikomatsakis opened this issue Feb 23, 2018 · 6 comments
Closed

Tracking issue for '_ #48469

nikomatsakis opened this issue Feb 23, 2018 · 6 comments
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Milestone

Comments

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Feb 23, 2018

This is a sub-issue of #44524, tracking the desire to stabilize '_ (and the lints around its usage).

Covered areas

The '_ can be used anywhere that a region can be elided. It (typically) carries the same meaning as having no region at all. This section summarizes its usage, giving pointers to tests, and also listing known blocking issues.

  • fn foo(x: Ref<'_>) -- fresh name
  • fn foo(&self) -> Ref<'_> -- links to self
  • fn foo(&self) -> Box<dyn Debug + '_> -- links to self, not quite the same as Box<dyn Debug>
  • fn foo(&self) -> Box<impl Debug + '_> -- links to self, not quite the same as Box<impl Debug>

Some areas where elision ought to be supported are not yet:

There are also several linted scenarios to nudge the user in the right direction:

Changes or clarifications to the RFC

The behavior around dyn Trait is probably worth highlighting, since it is one case where '_ differs from writing nothing at all.

@nikomatsakis nikomatsakis added T-lang Relevant to the language team, which will review and decide on the PR/issue. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. labels Feb 23, 2018
@Centril Centril added this to the 1.26 milestone Mar 8, 2018
@nikomatsakis
Copy link
Contributor Author

@rfcbot fcp merge

I want to propose that we stabilize '_, with the semantics as given in the header of this post. Note however that there are some blocking issues that must be resolved (cited in the header) before stabilization can actually occur. But those don't need to block us making the decision to stabilize.

@rfcbot
Copy link

rfcbot commented Mar 8, 2018

Team member @nikomatsakis has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Mar 8, 2018
@rfcbot
Copy link

rfcbot commented Mar 14, 2018

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Mar 14, 2018
@rfcbot
Copy link

rfcbot commented Mar 24, 2018

The final comment period is now complete.

@steveklabnik
Copy link
Member

was this closed by #49458 ?

@nikomatsakis
Copy link
Contributor Author

Seems like...yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants