Skip to content

cargo fmt -- --help displays no output #7027

Closed
rust-lang/rustfmt
#3620
@carols10cents

Description

@carols10cents

Problem

I ran cargo fmt -- --help and didn't get any output. I expected to get the same output that I do get when I run rustfmt --help, especially because the last line in cargo fmt --help says Arguments after `--` are passed to rustfmt.

The weirdest part is if I run cargo fmt -- --help=config, I do get the same output as I get if I run rustfmt --help=config, the configuration specific help. So cargo is passing through --help when it has an argument? And not passing it through when there isn't? I haven't investigated the cause at all, I'm just guessing based on the symptoms.

Steps

  1. Be on stable Rust with the rustfmt component installed.
  2. Run cargo fmt -- --help.
  3. Observe that there is no output.
  4. Observe the expected output by running rustfmt --help.

Notes

Output of cargo version: cargo 1.35.0 (6f3e9c3 2019-04-04)
Output of rustfmt --version: rustfmt 1.2.0-stable (09940a70 2019-03-27)
OS: macOS Mojave

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions