Skip to content

Nightly CI test failures due to unused assignment linting changes #16097

@ranger-ross

Description

@ranger-ross

Seems a recent change in nightly-2025-10-13 broke this test

- [WARNING] `foo` (lib) generated 1 warning
+ [WARNING] `foo` (lib) generated 1 warning (run `cargo fix --lib -p foo` to apply 1 suggestion)

Example failures in CI:

Looking at the logic for this line it appears we add the suggestion to run cargo fix if the warning is "fixable" and in a local crate.

The following snippet is how we determine if diagnostic is fixable

let machine_applicable: bool = msg
.children
.iter()
.map(|child| {
child
.spans
.iter()
.filter_map(|span| span.suggestion_applicability)
.any(|app| app == Applicability::MachineApplicable)
})
.any(|b| b);

I think rustc changed the value of suggestion_applicability in its json message but I am unsure which PR in rust-lang/rust changed this behavior

Metadata

Metadata

Assignees

Labels

A-testing-cargo-itselfArea: cargo's testsS-blocked-externalStatus: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions