Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
A big options clean-up #70729
A big options clean-up #70729
Conversation
|
I recommend reviewing this one commit at a time. |
|
This looks nice. Here are some things I spotted during review. |
|
This is great, thank you. After our discussion about |
|
I have some reservations regarding all the For unstable flag options
For stable flag options
(Or we can just avoid touching the |
|
|
I would strongly prefer that. I agree that |
Ok. |
Advantages of this:
Disadvantages of this:
In my opinion, the disadvantages outweigh the advantages, particularly given that the number of |
|
@nnethercote In "avoid touching the no-* options in this PR at all" I meant not touching them compared to the status quo (before this PR), not compared to this PR as is. |
I'll fix this and introduce the corresponding
Temporarily, see the previous comment.
Certainly not a big deal.
Why can't we come up with some description for |
|
Sorry for the confusion. I like the PR code as is. It deliberately introduces the minor functional change that all boolean options, including In contrast, I consider renaming flags or removing flags "non-minor" because rustc users might have to change how they use the compiler. |
|
Hmm, A problem with the Here's another possibility that avoids that problem, and also gets us away from the use of
|
I wanted to use the same method that is used in #70665 for merging |
bcf2973
to
07a6a56
|
I added a commit with a |
|
|
07a6a56
to
80a640d
They now all accept yes/no/y/n/on/off values. (Previously only some of them did.) This commit also makes `parse_bool` and `parse_opt_bool` more concise and readable, and adds some helpful comments to some functions.
Put identical ones next to each other, and avoid duplicated strings.
Currently, if you give a bogus value like `-Zsanitizer-memory-track-origins=99` you get this incorrect error: ``` error: debugging option `sanitizer-memory-track-origins` takes no value ``` This commit fixes it so it gives this instead: ``` error: incorrect value `99` for debugging option `sanitizer-memory-track-origins` - 0, 1, or 2 was expected ``` The commit also makes `parse_sanitizer_memory_track_origins` more readable.
Don't set `slot` on failure, like all the other `parse_*` functions.
Because all options now can take a value. This simplifies some code quite a bit.
This lets us specify the default at the options declaration point, instead of using `.unwrap(default)` or `None | Some(default)` at some use point far away. It also makes the code more concise.
For all `-C` and `-Z` options that have them. The commit also rewords a few options to make them clearer, mostly by avoiding the word "don't". It also removes the listed default for `-Cinline-threshold`, which is incorrect -- that option doesn't have a static default.
This commit: - Adds "following values" indicators for all the options that are missing them. - Tweaks some wording and punctuation for consistency. - Rewords some things for clarity. - Removes the `no-integrated-as` entry, because that option was removed in #70345.
With the exception of `-C no-redzone`, because that could take a value
before this PR.
This partially undoes one of the earlier commits in this PR, which added
the ability to take a value to all boolean options that lacked it.
The help output for these options looks like this:
```
-C no-vectorize-slp=val -- disable LLVM's SLP vectorization pass
```
The "=val" part is a lie, but hopefully this will be fixed in the future.
066fa09
to
3e3fd73
|
@bors p=1 because this PR is conflict-prone and other PRs will soon be depending on it. |
This is from rust-lang#70729, and is necessary for a boolean option parsed with `parse_bool` to have a `true` default. This commit will be removed before landing, because rust-lang#70729 will land before this PR.
|
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. The RFC will be merged soon. |
|
@bors r+ |
|
|
|
|
Lots of improvements here.
r? @Centril