Skip to content

Missing "no_such_crate did not match any packages" after cargo update --breaking #16258

@anforowicz

Description

@anforowicz

Problem

cargo update -- no_such_crate helpfully reports an error. Unexpectedly such an error is not reported when --breaking (one of -Zunstable-options) is used.

Steps

Repro steps:

$ cargo new foo
$ cd foo
$ cargo build # to generate Cargo.lock
$ cargo update -- no_such_crate
error: package ID specification `no_such_crate` did not match any packages
$ cargo update -Zunstable-options --breaking -- no_such_crate

Expected behavior: both cargo update ... no_such_crate commands should report an error

Actual behavior: only one of the commands reports an error

Possible Solution(s)

No response

Notes

No response

Version

$ cargo version --verbose
cargo 1.92.0-nightly (81c3f77a4 2025-10-10)
release: 1.92.0-nightly
commit-hash: 81c3f77a467359c8be6bc747dc93ec66a6e4ce11
commit-date: 2025-10-10
host: x86_64-unknown-linux-gnu
libgit2: 1.9.1 (sys:0.20.2 vendored)
libcurl: 8.15.0-DEV (sys:0.4.83+curl-8.15.0 vendored ssl:OpenSSL/3.5.4)
ssl: OpenSSL 3.5.4 30 Sep 2025
os: Debian n/a (rodete) [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugCommand-updateS-needs-mentorStatus: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.Z-update-breakingNightly: update-breaking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions