Uh oh!
There was an error while loading. Please reload this page.
Remove rustc_session::config::rustc_short_optgroups - #132891
Conversation
rustbot
commented
Nov 11, 2024
Uh oh!
There was an error while loading. Please reload this page.
jieyouxu
commented
Nov 11, 2024
r? jieyouxu |
| /// Display name for this option. Normally equal to `long_name`, except for | ||
| /// options that don't have a long name. | ||
| pub name: &'static str, |
There was a problem hiding this comment.
Suggestion: display_name? We have short_name and long_name below, so having just name feels a bit confusing.
There was a problem hiding this comment.
So, in the process of looking into this, I remembered that things are actually more complicated.
We do use this as a display name, but it also gets used for other things, such as matching against the option name reported by some getopts errors.
So I'm going to push a better comment, but now I don't like the idea of trying to rename name in this PR.
| /// If true, this option should not be printed by `rustc --help`, but | ||
| /// should still be printed by `rustc --help -v`. | ||
| pub is_verbose_help_only: bool, |
There was a problem hiding this comment.
Remark: yes thank you, this is so much clearer.
Uh oh!
There was an error while loading. Please reload this page.
jieyouxu
commented
Nov 11, 2024
@rustbot author |
e4d6ff5 to
8b4701dCompareZalathar
commented
Nov 11, 2024
jieyouxu
commented
Nov 11, 2024
@bors r+ rollup |
bors
commented
Nov 11, 2024
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#129627 (Ensure that tail expr receive lifetime extension) - rust-lang#130999 (Implement file_lock feature) - rust-lang#132873 (handle separate prefixes in clippy rules) - rust-lang#132891 (Remove `rustc_session::config::rustc_short_optgroups`) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#129627 (Ensure that tail expr receive lifetime extension) - rust-lang#130999 (Implement file_lock feature) - rust-lang#132873 (handle separate prefixes in clippy rules) - rust-lang#132891 (Remove `rustc_session::config::rustc_short_optgroups`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#132891 - Zalathar:short-opt-groups, r=jieyouxu Remove `rustc_session::config::rustc_short_optgroups` Follow-up to rust-lang#132754 (comment). The name `rustc_short_optgroups` has always been confusing, because it is unrelated to the distinction between short and long options (i.e. `-s` vs `--long`), and instead means something like “the subset of command-line options that are printed by `rustc --help` without `-v`”. So let's merge that function into the main `rustc_optgroups`, and store the relevant bit of information in a boolean field in `RustcOptGroup` instead. --- This PR also modifies `RustcOptGroup` to store its various strings directly, instead of inside a boxed `apply` closure. That turned out to not be necessary for the main change, but is a worthwhile cleanup in its own right.
Remove `rustc_session::config::rustc_short_optgroups` Follow-up to rust-lang#132754 (comment). The name `rustc_short_optgroups` has always been confusing, because it is unrelated to the distinction between short and long options (i.e. `-s` vs `--long`), and instead means something like “the subset of command-line options that are printed by `rustc --help` without `-v`”. So let's merge that function into the main `rustc_optgroups`, and store the relevant bit of information in a boolean field in `RustcOptGroup` instead. --- This PR also modifies `RustcOptGroup` to store its various strings directly, instead of inside a boxed `apply` closure. That turned out to not be necessary for the main change, but is a worthwhile cleanup in its own right.
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#129627 (Ensure that tail expr receive lifetime extension) - rust-lang#130999 (Implement file_lock feature) - rust-lang#132873 (handle separate prefixes in clippy rules) - rust-lang#132891 (Remove `rustc_session::config::rustc_short_optgroups`) r? `@ghost` `@rustbot` modify labels: rollup
Follow-up to #132754 (comment).
The name
rustc_short_optgroupshas always been confusing, because it is unrelated to the distinction between short and long options (i.e.-svs--long), and instead means something like “the subset of command-line options that are printed byrustc --helpwithout-v”.So let's merge that function into the main
rustc_optgroups, and store the relevant bit of information in a boolean field inRustcOptGroupinstead.This PR also modifies
RustcOptGroupto store its various strings directly, instead of inside a boxedapplyclosure. That turned out to not be necessary for the main change, but is a worthwhile cleanup in its own right.