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

Make sure to mark IMPL_TRAIT_REDUNDANT_CAPTURES as Allow in edition 2024 #135441

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

compiler-errors
Copy link
Member

I never got sign-off on #127672 for this lint being warn by default in edition 2024, so let's turn downgrade this lint to allow for now.

Should be backported so it ships with the edition.

@rustbot label: +beta-nominated

@rustbot
Copy link
Collaborator

rustbot commented Jan 13, 2025

r? @wesleywiser

rustbot has assigned @wesleywiser.
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

@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. beta-nominated Nominated for backporting to the compiler in the beta channel. labels Jan 13, 2025
@rust-log-analyzer

This comment has been minimized.

@compiler-errors compiler-errors force-pushed the redundant-captures-lint branch from 8adc4d5 to 1b068a0 Compare January 13, 2025 16:42
Copy link
Member

@lqd lqd left a comment

Choose a reason for hiding this comment

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

this looks good to me and you can r=me, unless you want to first discuss with the edition or lang team to see if we need to downgrade the lint, or if it can stay warn by default. I'm not sure if you are waiting for them for answer on that.

@compiler-errors
Copy link
Member Author

I don't really think there's a compelling reason to keep this as a warn-level lint, and there are several arguments against it (e.g. changing fn foo(x: &'static ()) -> impl Foo + use<> to fn foo(x: &'static ()) -> impl Foo introduces a new footgun if you relaxed the signature later to fn foo(x: &()) -> impl Foo, since now the RPIT captures the anonymous lifetime but it wouldn't if you had keep the + use<>).

The fact that this was never discussed at length is enough to downgrade this to allow.

but cc @rust-lang/project-edition-2024 I guess.

@bors r=lqd rollup

@bors
Copy link
Contributor

bors commented Jan 13, 2025

📌 Commit 1b068a0 has been approved by lqd

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-review Status: Awaiting review from the assignee but also interested parties. labels Jan 13, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 13, 2025
…-lint, r=lqd

Make sure to mark `IMPL_TRAIT_REDUNDANT_CAPTURES` as `Allow` in edition 2024

I never got sign-off on rust-lang#127672 for this lint being warn by default in edition 2024, so let's turn downgrade this lint to allow for now.

Should be backported so it ships with the edition.

`@rustbot` label: +beta-nominated
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 13, 2025
…-lint, r=lqd

Make sure to mark `IMPL_TRAIT_REDUNDANT_CAPTURES` as `Allow` in edition 2024

I never got sign-off on rust-lang#127672 for this lint being warn by default in edition 2024, so let's turn downgrade this lint to allow for now.

Should be backported so it ships with the edition.

``@rustbot`` label: +beta-nominated
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 13, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#134498 (Fix cycle error only occurring with -Zdump-mir)
 - rust-lang#135440 (rm unnecessary `OpaqueTypeDecl` wrapper)
 - rust-lang#135441 (Make sure to mark `IMPL_TRAIT_REDUNDANT_CAPTURES` as `Allow` in edition 2024)
 - rust-lang#135444 (Update books)
 - rust-lang#135451 (Remove code duplication when hashing query result and interning node)
 - rust-lang#135452 (bootstrap: fix outdated feature name in comment)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 14, 2025
Rollup of 10 pull requests

Successful merges:

 - rust-lang#134498 (Fix cycle error only occurring with -Zdump-mir)
 - rust-lang#134977 (Detect `mut arg: &Ty` meant to be `arg: &mut Ty` and provide structured suggestion)
 - rust-lang#135390 (Re-added regression test for rust-lang#122638)
 - rust-lang#135393 (uefi: helpers: Introduce OwnedDevicePath)
 - rust-lang#135440 (rm unnecessary `OpaqueTypeDecl` wrapper)
 - rust-lang#135441 (Make sure to mark `IMPL_TRAIT_REDUNDANT_CAPTURES` as `Allow` in edition 2024)
 - rust-lang#135444 (Update books)
 - rust-lang#135450 (Fix emscripten-wasm-eh with unwind=abort)
 - rust-lang#135452 (bootstrap: fix outdated feature name in comment)
 - rust-lang#135454 (llvm: Allow sized-word rather than ymmword in tests)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 77b7ee1 into rust-lang:master Jan 14, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 14, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 14, 2025
Rollup merge of rust-lang#135441 - compiler-errors:redundant-captures-lint, r=lqd

Make sure to mark `IMPL_TRAIT_REDUNDANT_CAPTURES` as `Allow` in edition 2024

I never got sign-off on rust-lang#127672 for this lint being warn by default in edition 2024, so let's turn downgrade this lint to allow for now.

Should be backported so it ships with the edition.

```@rustbot``` label: +beta-nominated
@apiraino
Copy link
Contributor

Beta backport accepted as per compiler team on Zulip. A backport PR will be authored by the release team at the end of the current development cycle. Backport labels handled by them.

@rustbot label +beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jan 16, 2025
@cuviper cuviper mentioned this pull request Jan 17, 2025
@cuviper cuviper modified the milestones: 1.86.0, 1.85.0 Jan 17, 2025
@cuviper cuviper removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jan 17, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 17, 2025
[beta] backports

- do not in-place-iterate over flatmap/flatten rust-lang#135104
- Make sure to mark `IMPL_TRAIT_REDUNDANT_CAPTURES` as `Allow` in edition 2024 rust-lang#135441
- Update to LLVM 19.1.7 rust-lang#135484

r? cuviper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. 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