Skip to content

Suggest use another lifetime specifier instead of underscore lifetime #143231

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

Merged
merged 1 commit into from
Jul 2, 2025

Conversation

xizheyin
Copy link
Contributor

@xizheyin xizheyin commented Jun 30, 2025

cc #143152

r? compiler

@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 Jun 30, 2025
@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot 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 Jun 30, 2025
@xizheyin
Copy link
Contributor Author

xizheyin commented Jul 1, 2025

@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 Jul 1, 2025
Copy link
Member

@fee1-dead fee1-dead left a comment

Choose a reason for hiding this comment

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

please squash the commits

Comment on lines 4 to 5
//~^ ERROR `_` cannot be a raw lifetime
//~| ERROR `'_` cannot be used here [E0637]
Copy link
Member

Choose a reason for hiding this comment

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

you haven't fixed the issue. please deduplicate the diagnostics

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For both errors, I think they should be preserved.

Since the first one is for the error of using raw strings, and the second one is the error of not supposed to have underscore in the argument list. I've added a note to the second one to show that they are different.

Copy link
Member

Choose a reason for hiding this comment

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

Then this doesn't fix #143152. If you don't want to fix #143152, we can remove the "Fixes" clause in your PR and merge it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I changed Fixes to cc.

Copy link
Member

Choose a reason for hiding this comment

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

You should probably remove this test since it isn't testing any fixes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, because the problem pointed out in #143152 is not an error, it doesn't need to be fixed.

@rustbot rustbot 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 Jul 1, 2025
@rust-log-analyzer

This comment has been minimized.

@fee1-dead
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 2, 2025

📌 Commit e7c3703 has been approved by fee1-dead

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 2, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 2, 2025
Suggest use another lifetime specifier instead of underscore lifetime

cc rust-lang#143152

r? compiler
bors added a commit that referenced this pull request Jul 2, 2025
Rollup of 12 pull requests

Successful merges:

 - #141847 (Explain `TOCTOU` on the top of `std::fs`, and reference it in functions)
 - #142138 (Add `Vec::into_chunks`)
 - #142321 (Expose elf abi on ppc64 targets)
 - #142886 (ci: aarch64-gnu: Stop skipping `panic_abort_doc_tests`)
 - #143038 (avoid suggesting traits from private dependencies)
 - #143194 (fix bitcast of single-element SIMD vectors)
 - #143206 (Align attr fixes)
 - #143231 (Suggest use another lifetime specifier instead of underscore lifetime)
 - #143232 ([COMPILETEST-UNTANGLE 3/N] Use "directives" consistently within compiletest)
 - #143258 (Don't recompute `DisambiguatorState` for every RPITIT in trait definition)
 - #143260 (Use the correct export kind for __rust_alloc_error_handler_should_panic)
 - #143274 (ci: support optional jobs)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 2, 2025
Suggest use another lifetime specifier instead of underscore lifetime

cc rust-lang#143152

r? compiler
bors added a commit that referenced this pull request Jul 2, 2025
Rollup of 11 pull requests

Successful merges:

 - #141847 (Explain `TOCTOU` on the top of `std::fs`, and reference it in functions)
 - #142138 (Add `Vec::into_chunks`)
 - #142321 (Expose elf abi on ppc64 targets)
 - #142886 (ci: aarch64-gnu: Stop skipping `panic_abort_doc_tests`)
 - #143038 (avoid suggesting traits from private dependencies)
 - #143194 (fix bitcast of single-element SIMD vectors)
 - #143231 (Suggest use another lifetime specifier instead of underscore lifetime)
 - #143232 ([COMPILETEST-UNTANGLE 3/N] Use "directives" consistently within compiletest)
 - #143258 (Don't recompute `DisambiguatorState` for every RPITIT in trait definition)
 - #143260 (Use the correct export kind for __rust_alloc_error_handler_should_panic)
 - #143274 (ci: support optional jobs)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 2, 2025
Suggest use another lifetime specifier instead of underscore lifetime

cc rust-lang#143152

r? compiler
bors added a commit that referenced this pull request Jul 2, 2025
Rollup of 10 pull requests

Successful merges:

 - #141847 (Explain `TOCTOU` on the top of `std::fs`, and reference it in functions)
 - #142138 (Add `Vec::into_chunks`)
 - #142321 (Expose elf abi on ppc64 targets)
 - #142886 (ci: aarch64-gnu: Stop skipping `panic_abort_doc_tests`)
 - #143194 (fix bitcast of single-element SIMD vectors)
 - #143231 (Suggest use another lifetime specifier instead of underscore lifetime)
 - #143232 ([COMPILETEST-UNTANGLE 3/N] Use "directives" consistently within compiletest)
 - #143258 (Don't recompute `DisambiguatorState` for every RPITIT in trait definition)
 - #143260 (Use the correct export kind for __rust_alloc_error_handler_should_panic)
 - #143274 (ci: support optional jobs)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jul 2, 2025
Rollup of 9 pull requests

Successful merges:

 - #141847 (Explain `TOCTOU` on the top of `std::fs`, and reference it in functions)
 - #142138 (Add `Vec::into_chunks`)
 - #142321 (Expose elf abi on ppc64 targets)
 - #142886 (ci: aarch64-gnu: Stop skipping `panic_abort_doc_tests`)
 - #143194 (fix bitcast of single-element SIMD vectors)
 - #143231 (Suggest use another lifetime specifier instead of underscore lifetime)
 - #143232 ([COMPILETEST-UNTANGLE 3/N] Use "directives" consistently within compiletest)
 - #143258 (Don't recompute `DisambiguatorState` for every RPITIT in trait definition)
 - #143274 (ci: support optional jobs)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3ff0aa5 into rust-lang:master Jul 2, 2025
10 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 2, 2025
rust-timer added a commit that referenced this pull request Jul 2, 2025
Rollup merge of #143231 - xizheyin:143152, r=fee1-dead

Suggest use another lifetime specifier instead of underscore lifetime

cc #143152

r? compiler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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.

7 participants