about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-01-19 11:48:17 +0100
committerGitHub <noreply@github.com>2025-01-19 11:48:17 +0100
commitdcc71c06373770e0058190b5ac86f03c8d99cd26 (patch)
treee75033fbed42810bdb410e5efd796eb22f7a0acd /compiler/rustc_pattern_analysis/src
parentdde62f9be54ad3015c056fd19222a283185c1641 (diff)
parent93f69b23006d180e2f6cf2d6f7efeab17b2c2cf2 (diff)
downloadrust-dcc71c06373770e0058190b5ac86f03c8d99cd26.tar.gz
rust-dcc71c06373770e0058190b5ac86f03c8d99cd26.zip
Rollup merge of #135716 - Zalathar:usage-no-args, r=lqd
Don't skip argument parsing when running `rustc` with no arguments

Setting up the argument parser to parse no arguments is a tiny bit of wasted work, but avoids an otherwise-unnecessary special case, in a scenario (printing a help message and quitting) where perf at this scale really doesn't matter anyway.

In particular, this lets us avoid having to deal with multiple different APIs to determine whether the compiler is nightly or not.

---

This special-case handling for rustc with no arguments is very very old (long predating 1.0), and used to be much simpler, without any need to set up boolean values to handle various conditional cases. So I don't think it was ever explicitly decided that having this special case was worth the extra complexity; it just started out simple and accumulated complexity over time.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions