Skip to content

cargo clean --bin ... does not work #10898

Open
@vporton

Description

@vporton

Problem

I have

[[bin]]
name = "migrate"

in my Cargo.toml.

When I try to delete this target, it does not work:

$ cargo clean --bin migrate
error: Found argument '--bin' which wasn't expected, or isn't valid in this context

Steps

  1. Create a package with [[bin]].
  2. Compile it.
  3. Try to remove.

Possible Solution(s)

cargo clean --bin ... should remove the binary.

Notes

No response

Version

cargo 1.61.0 (a028ae4 2022-04-29)
release: 1.61.0
commit-hash: a028ae42fc1376571de836be702e840ca8e060c2
commit-date: 2022-04-29
host: x86_64-unknown-linux-gnu
libgit2: 1.4.2 (sys:0.14.2 vendored)
libcurl: 7.80.0-DEV (sys:0.4.51+curl-7.80.0 vendored ssl:OpenSSL/1.1.1m)
os: Ubuntu 22.04 (jammy) [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugCommand-cleanS-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions