rust icon indicating copy to clipboard operation
rust copied to clipboard

Tracking Issue for RFC 3606: Drop temporaries in tail expressions before local variables

Open traviscross opened this issue 1 year ago • 2 comments

This is a tracking issue for the RFC 3606: Drop temporaries in tail expressions before local variables

  • https://github.com/rust-lang/rfcs/pull/3606

The feature gate for the issue is #![feature(shorter_tail_lifetimes)].

About tracking issues

Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Steps

  • [x] Accept RFC: https://github.com/rust-lang/rfcs/pull/3606
  • [x] Implement under feature flag with Rust 2024 behavior.
    • https://github.com/rust-lang/rust/pull/125293
  • [ ] Crater run(s) to collect data for migration lints.
    • https://github.com/rust-lang/rust/pull/129604
    • https://github.com/rust-lang/rust/pull/129607
  • [ ] Implement migration lints.
    • https://github.com/rust-lang/rust-clippy/pull/13175
    • https://github.com/rust-lang/rust/pull/128662
  • [ ] Stabilize in nightly Rust 2024.
  • [ ] Add documentation to the dev guide.
  • [ ] Add documentation to the reference.
  • [ ] Add documentation to the edition guide.
    • https://github.com/rust-lang/edition-guide/pull/318
  • [ ] Add formatting for new syntax to the style guide.
  • [ ] Ensure ready for Rust 2024 stabilization.

Unresolved Questions

  • [ ] How uncommon are the situations where this change could affect existing code?
  • [ ] How advanced should the edition lint and migration be?
  • [ ] Can we make sure a lint catches the cases with unsafe code that could result in undefined behaviour?
  • [ ] Do we want to warn-by-default about these cases in older editions, or only warn when upgrading to Rust 2024?
    • https://github.com/rust-lang/rust/pull/128662#discussion_r1717408324

Related

  • https://github.com/rust-lang/rust-clippy/pull/13175
  • https://github.com/rust-lang/rust/pull/128662

cc @nikomatsakis @m-ou-se

traviscross avatar Apr 10 '24 19:04 traviscross

@rustbot claim

dingxiangfei2009 avatar Apr 16 '24 12:04 dingxiangfei2009

(assigning self as lang team liason to ensure things progress here for 2024 edition)

pnkfelix avatar Apr 17 '24 17:04 pnkfelix

@traviscross One quick question.

Add documentation to the dev guide.

Do we need this action item?

dingxiangfei2009 avatar Aug 28 '24 15:08 dingxiangfei2009

@rustbot labels +S-tracking-ready-for-edition

On the edition side, we've reviewed this item, and it's now ready for Rust 2024.

Huge thanks to @dingxiangfei2009 for his great work on pushing this item forward and getting it done.

traviscross avatar Nov 26 '24 00:11 traviscross