Skip to content

Reduce mismatched-lifetime-syntaxes suggestions to MaybeIncorrect #142980

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

shepmaster
Copy link
Member

@shepmaster shepmaster commented Jun 24, 2025

cargo fix does not have a way of distinguishing a suggestion with
multiple spans which should all be applied from multiple suggestions
where only one should be applied (see #53934). cargo fix only works
with MachineApplicable suggestions, so downgrading the applicability
will stop cargo from suggesting the user run cargo fix. rust-analyzer does work with MaybeIncorrect, so interactive
fixes are still available.

r? @ehuss

@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 24, 2025
@rustbot

This comment has been minimized.

`cargo fix` does not have a way of distinguishing a suggestion with
multiple spans which should all be applied from multiple suggestions
where only one should be applied (see issue 53934). `cargo fix` only
works with `MachineApplicable` suggestions, so downgrading the
applicability will stop `cargo` from suggesting the user run `cargo
fix`. rust-analyzer does work with `MaybeIncorrect`, so interactive
fixes are still available.
@shepmaster shepmaster force-pushed the mismatched-syntaxes-multi-suggestions branch from 7a4ef9b to 46e9d2f Compare June 24, 2025 18:53
@shepmaster shepmaster added the L-mismatched_lifetime_syntaxes Lint: mismatched_lifetime_syntaxes label Jun 24, 2025
@ehuss
Copy link
Contributor

ehuss commented Jun 25, 2025

Thanks!

Dunno what the CI error is about (The hosted runner lost communication with the server. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error.), but I'll assume everything is fine.

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 25, 2025

📌 Commit 46e9d2f has been approved by ehuss

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 Jun 25, 2025
bors added a commit that referenced this pull request Jun 25, 2025
Rollup of 15 pull requests

Successful merges:

 - #135731 (Implement parsing of pinned borrows)
 - #138780 (Add `#[loop_match]` for improved DFA codegen)
 - #142453 (Windows: make `read_dir` stop iterating after the first error is encountered)
 - #142633 (Error on invalid signatures for interrupt ABIs)
 - #142768 (Avoid a bitcast FFI call in transmuting)
 - #142825 (Port `#[track_caller]` to the new attribute system)
 - #142844 (Enable short-ice for Windows)
 - #142934 (Tweak `-Zmacro-stats` measurement.)
 - #142955 (Couple of test suite fixes for cg_clif)
 - #142977 (rustdoc: Don't mark `#[target_feature]` functions as ⚠)
 - #142980 (Reduce mismatched-lifetime-syntaxes suggestions to MaybeIncorrect)
 - #142982 (Corrected spelling mistake in c_str.rs)
 - #142983 (Taint body on invalid call ABI)
 - #142988 (Update wasm-component-ld to 0.5.14)
 - #142993 (Update cargo)

r? `@ghost`
`@rustbot` modify labels: rollup
@jieyouxu
Copy link
Member

Dunno what the CI error is about (The hosted runner lost communication with the server. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error.), but I'll assume everything is fine.

Sometimes CI jobs just don't get picked up by runners unfortunately.

@bors bors merged commit ced6109 into rust-lang:master Jun 25, 2025
17 of 20 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jun 25, 2025
rust-timer added a commit that referenced this pull request Jun 25, 2025
Rollup merge of #142980 - shepmaster:mismatched-syntaxes-multi-suggestions, r=ehuss

Reduce mismatched-lifetime-syntaxes suggestions to MaybeIncorrect

`cargo fix` does not have a way of distinguishing a suggestion with
multiple spans which should all be applied from multiple suggestions
where only one should be applied (see #53934). `cargo fix` only works
with `MachineApplicable` suggestions, so downgrading the applicability
will stop `cargo` from suggesting the user run `cargo
fix`. rust-analyzer does work with `MaybeIncorrect`, so interactive
fixes are still available.

r? `@ehuss`
@shepmaster shepmaster deleted the mismatched-syntaxes-multi-suggestions branch June 25, 2025 12:41
@shepmaster shepmaster added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-nominated Nominated for backporting to the compiler in the beta channel. L-mismatched_lifetime_syntaxes Lint: mismatched_lifetime_syntaxes 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