Skip to content

Allow cargo fix to partially apply mismatched_lifetime_syntaxes #144601

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

Conversation

kornelski
Copy link
Contributor

Workaround for #144588 (comment)

Not all suggestions have to be hidden from cargo fix, only redundant ones. The redundant ones are already hidden from the user, so the same tool_only flag can be used to hide them from cargo fix. This way cargo fix will be able to correctly apply the fixes, and will apply only the fix that the compiler visibly suggests to the user.

@rustbot
Copy link
Collaborator

rustbot commented Jul 28, 2025

r? @petrochenkov

rustbot has assigned @petrochenkov.
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. labels Jul 28, 2025
@shepmaster
Copy link
Member

/cc @ehuss. Is this an acceptable alternative fix to #142980 / #142998?

@petrochenkov
Copy link
Contributor

Looks reasonable to me.
r? @ehuss

@rustbot rustbot assigned ehuss and unassigned petrochenkov Jul 29, 2025
@ehuss
Copy link
Contributor

ehuss commented Aug 6, 2025

I think it should work.

@bors r=petrochenkov

@bors
Copy link
Collaborator

bors commented Aug 6, 2025

📌 Commit 081b565 has been approved by petrochenkov

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 Aug 6, 2025
@ehuss
Copy link
Contributor

ehuss commented Aug 6, 2025

@bors rollup

tgross35 added a commit to tgross35/rust that referenced this pull request Aug 7, 2025
…etime_syntaxes, r=petrochenkov

Allow `cargo fix` to partially apply `mismatched_lifetime_syntaxes`

Workaround for rust-lang#144588 (comment)

Not all suggestions have to be hidden from `cargo fix`, only redundant ones. The redundant ones are already hidden from the user, so the same `tool_only` flag can be used to hide them from `cargo fix`. This way `cargo fix` will be able to correctly apply the fixes, and will apply only the fix that the compiler visibly suggests to the user.
bors added a commit that referenced this pull request Aug 7, 2025
Rollup of 7 pull requests

Successful merges:

 - #138689 (add nvptx_target_feature)
 - #140267 (implement continue_ok and break_ok for ControlFlow)
 - #143807 (Pass -Werror when building the LLVM wrapper)
 - #144369 (Upgrade semicolon_in_expressions_from_macros from warn to deny)
 - #144601 (Allow `cargo fix` to partially apply `mismatched_lifetime_syntaxes`)
 - #144682 (Stabilize `strict_overflow_ops`)
 - #145026 (Update books)

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

Successful merges:

 - #137831 (Tweak auto trait errors)
 - #138689 (add nvptx_target_feature)
 - #140267 (implement continue_ok and break_ok for ControlFlow)
 - #143028 (emit `StorageLive` and schedule `StorageDead` for `let`-`else`'s bindings after matching)
 - #143764 (lower pattern bindings in the order they're written and base drop order on primary bindings' order)
 - #143808 (Port `#[should_panic]` to the new attribute parsing infrastructure )
 - #143906 (Miri: non-deterministic floating point operations in `foreign_items`)
 - #143929 (Mark all deprecation lints in name resolution as deny-by-default and report-in-deps)
 - #144133 (Stabilize const TypeId::of)
 - #144369 (Upgrade semicolon_in_expressions_from_macros from warn to deny)
 - #144439 (Introduce ModernIdent type to unify macro 2.0 hygiene handling)
 - #144473 (Address libunwind.a inconsistency issues in the bootstrap program)
 - #144601 (Allow `cargo fix` to partially apply `mismatched_lifetime_syntaxes`)
 - #144650 (Additional tce tests)
 - #144659 (bootstrap: refactor mingw dist and fix gnullvm)
 - #144682 (Stabilize `strict_overflow_ops`)
 - #145026 (Update books)
 - #145033 (Reimplement `print_region` in `type_name.rs`.)
 - #145040 (rustc-dev-guide subtree update)

Failed merges:

 - #143857 (Port #[macro_export] to the new attribute parsing infrastructure)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d8ed17a into rust-lang:master Aug 7, 2025
10 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 7, 2025
rust-timer added a commit that referenced this pull request Aug 7, 2025
Rollup merge of #144601 - kornelski:cargo-fix-mismatched_lifetime_syntaxes, r=petrochenkov

Allow `cargo fix` to partially apply `mismatched_lifetime_syntaxes`

Workaround for #144588 (comment)

Not all suggestions have to be hidden from `cargo fix`, only redundant ones. The redundant ones are already hidden from the user, so the same `tool_only` flag can be used to hide them from `cargo fix`. This way `cargo fix` will be able to correctly apply the fixes, and will apply only the fix that the compiler visibly suggests to the user.
@kornelski kornelski deleted the cargo-fix-mismatched_lifetime_syntaxes branch August 7, 2025 18:23
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.

6 participants