Skip to content
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

Ensure that tail expr receive lifetime extension #129627

Merged

Conversation

dingxiangfei2009
Copy link
Contributor

@dingxiangfei2009 dingxiangfei2009 commented Aug 26, 2024

cc @jieyouxu @traviscross

It just came to me that we should add a test to make sure that we honor the contract from the temporary lifetime rule #121346. We should continue to implement this rule in Edition 2021 onward and shorter tail expression lifetime should not override it.

This is a small PR to improve our assurance and establish a stronger contract.

Tracked by #123739

@rustbot
Copy link
Collaborator

rustbot commented Aug 26, 2024

r? @TaKO8Ki

rustbot has assigned @TaKO8Ki.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@dingxiangfei2009
Copy link
Contributor Author

r? @jieyouxu

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 26, 2024
@rustbot rustbot assigned jieyouxu and unassigned TaKO8Ki Aug 26, 2024
@jieyouxu jieyouxu added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 27, 2024
@alex-semenyuk alex-semenyuk added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 26, 2024
@Dylan-DPC
Copy link
Member

@dingxiangfei2009 any updates on this? thanks

@dingxiangfei2009
Copy link
Contributor Author

I will update the PR this week. I am priortising the lint over the additional test fixture to finish cooking lint ASAP.

@Dylan-DPC
Copy link
Member

@dingxiangfei2009 any updates on this?

@dingxiangfei2009
Copy link
Contributor Author

@Dylan-DPC Thanks for the reminder. The PR is ready for review again.

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 11, 2024
@dingxiangfei2009 dingxiangfei2009 force-pushed the ensure-tail-expr-in-let-block-works branch from 75aa56a to aee8152 Compare November 11, 2024 12:34
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! You can r=me after PR CI is green.

@jieyouxu
Copy link
Member

@bors delegate+

@bors
Copy link
Collaborator

bors commented Nov 11, 2024

✌️ @dingxiangfei2009, you can now approve this pull request!

If @jieyouxu told you to "r=me" after making some further change, please make that change, then do @bors r=@jieyouxu

@dingxiangfei2009
Copy link
Contributor Author

@bors r=@jieyouxu

@bors
Copy link
Collaborator

bors commented Nov 11, 2024

📌 Commit aee8152 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 11, 2024
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 11, 2024
@jieyouxu
Copy link
Member

@bors rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 11, 2024
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#129627 (Ensure that tail expr receive lifetime extension)
 - rust-lang#130999 (Implement file_lock feature)
 - rust-lang#132873 (handle separate prefixes in clippy rules)
 - rust-lang#132891 (Remove `rustc_session::config::rustc_short_optgroups`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 11, 2024
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#129627 (Ensure that tail expr receive lifetime extension)
 - rust-lang#130999 (Implement file_lock feature)
 - rust-lang#132873 (handle separate prefixes in clippy rules)
 - rust-lang#132891 (Remove `rustc_session::config::rustc_short_optgroups`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d4abc31 into rust-lang:master Nov 11, 2024
6 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 11, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 11, 2024
Rollup merge of rust-lang#129627 - dingxiangfei2009:ensure-tail-expr-in-let-block-works, r=jieyouxu

Ensure that tail expr receive lifetime extension

cc `@jieyouxu` `@traviscross`

It just came to me that we should add a test to make sure that we honor the contract from the temporary lifetime rule rust-lang#121346. We should continue to implement this rule in Edition 2021 onward and shorter tail expression lifetime should not override it.

This is a small PR to improve our assurance and establish a stronger contract.

Tracked by rust-lang#123739
mati865 pushed a commit to mati865/rust that referenced this pull request Nov 12, 2024
…in-let-block-works, r=jieyouxu

Ensure that tail expr receive lifetime extension

cc `@jieyouxu` `@traviscross`

It just came to me that we should add a test to make sure that we honor the contract from the temporary lifetime rule rust-lang#121346. We should continue to implement this rule in Edition 2021 onward and shorter tail expression lifetime should not override it.

This is a small PR to improve our assurance and establish a stronger contract.

Tracked by rust-lang#123739
mati865 pushed a commit to mati865/rust that referenced this pull request Nov 12, 2024
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#129627 (Ensure that tail expr receive lifetime extension)
 - rust-lang#130999 (Implement file_lock feature)
 - rust-lang#132873 (handle separate prefixes in clippy rules)
 - rust-lang#132891 (Remove `rustc_session::config::rustc_short_optgroups`)

r? `@ghost`
`@rustbot` modify labels: rollup
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants