rust-lang / rust-lang/rust

rustc man page does not match `rustc --help` output

Open Beginner friendly
#149,875 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-docs T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Location (URL)

https://github.com/rust-lang/rust/blob/main/src/doc/man/rustc.1#L65

Summary

The rustc man page shows

-O
    Equivalent to -C opt-level=2.

that's different from rustc output

❯ /usr/bin/rustc --help | grep -- "-O"
    -O                  Equivalent to -C opt-level=3
❯ rustc -V
rustc 1.91.1 (ed61e7d7e 2025-11-07) (Arch Linux rust 1:1.91.1-2)

More information from https://bbs.archlinux.org/viewtopic.php?pid=2277265#p2277265

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open src/doc/man/rustc.1 around line 65 and compare the -O entry with the output of rustc --help. Update the man page so the optimization-level description matches the command output, then verify the resulting text against rustc --help.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.