-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-Z location-detail
: provide option to disable all location details
#99620
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
I'm not the right reviewer for this change. r? @davidtwco |
Personally, I think it might be more intuitive to have an explicit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @Aaron1011, I'd prefer to see this with a none
or no
option than accepting an empty list. As far as I can gather from skimming the parse functions, we don't have any other options that accept an empty list, but we do have some that accept none
/no
.
0f78281
to
455e470
Compare
Updated to support |
Should be fixed also there (but i don't see where it used) rust/compiler/rustc_session/src/options.rs Lines 397 to 398 in c9b3183
and there rust/compiler/rustc_session/src/options.rs Lines 1349 to 1351 in c9b3183
Should |
9956b6f
to
6e89c4c
Compare
-Z location-detail
: disable all location details when passed empty list-Z location-detail
: provide option to disable all location details
Fixed. And I agree it is confusing to see where this constant is used -- the key is that the
I removed any mention of |
Prior to this fix, `-Z location-detail` provided no mechanism for disabling all location details. This commit also adds a test case to verify that this option continues to work as intended, and clarifies the documentation of this option.
6e89c4c
to
6dea21a
Compare
@bors r+ |
…askrgr Rollup of 7 pull requests Successful merges: - rust-lang#99519 (Remove implicit names and values from `--cfg` in `--check-cfg`) - rust-lang#99620 (`-Z location-detail`: provide option to disable all location details) - rust-lang#99932 (Fix unwinding on certain platforms when debug assertions are enabled) - rust-lang#99973 (Layout things) - rust-lang#99980 (Remove more Clean trait implementations) - rust-lang#99984 (Fix compat.rs for `cfg(miri)`) - rust-lang#99986 (Add wrap suggestions for record variants) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
As reported here, when I first implemented the
-Z location-detail
flag there was a bug, where passing an empty list was not correctly supported, and instead rejected by the compiler. This PR fixes that such that passing an empty list results in no location details being tracked, as originally specified in rust-lang/rfcs#2091 .This PR also adds a test case to verify that this option continues to work as intended.