-
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
--cap-lints allow
switches off can_emit_warnings
#44627
Conversation
This boolean field on the error `Handler` is toggled to silence warnings when `-A warnings` is passed. (This is actually a separate mechanism from the global lint level—whether there's some redundancy to be factored away here is an important question, but not one we concern ourselves with in this commit.) But the same rationale applies for `--cap-lints allow`. In particular, this makes the "soft" feature-gate warning introduced in 8492ad2 (which is not a lint, but just calls `struct_span_warn`) not pollute the builds of dependent crates. Thanks to @kennytm for pointing out the potential of `can_emit_warnings` for this purpose. Resolves rust-lang#44213.
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
I would like to nominate this for backporting to beta. |
r? @nrc (I think, you know how these work? Feel free to reassign). |
@bors: r+ This is a kind of significant change because it blurs the lines between lints and warnings, but I think in practical terms this is pure win. |
📌 Commit d02ceac has been approved by |
`--cap-lints allow` switches off `can_emit_warnings` This boolean field on the error `Handler` is toggled to silence warnings when `-A warnings` is passed. (This is actually a separate mechanism from the global lint level—whether there's some redundancy to be factored away here is an important question, but not one we concern ourselves with in this commit.) But the same rationale applies for `--cap-lints allow`. In particular, this makes the "soft" feature-gate warning introduced in 8492ad2 (which is not a lint, but just calls `struct_span_warn`) not pollute the builds of dependent crates. Thanks to @kennytm for pointing out the potential of `can_emit_warnings` for this purpose. Resolves #44213.
☀️ Test successful - status-appveyor, status-travis |
Marking as beta-accepted. Small issue. cc @rust-lang/compiler |
Backporting now. |
Beta 20170928 Backports of: - Allow unused extern crate again #44825 - macros: fix bug in collecting trait and impl items with derives. #44757 - `--cap-lints allow` switches off `can_emit_warnings` #44627 - Update the libc submodule #44116 - limit and clear cache obligations opportunistically #44269 - clear out projection subobligations after they are processed #43999
Beta 20170928 Backports of: - Allow unused extern crate again #44825 - macros: fix bug in collecting trait and impl items with derives. #44757 - `--cap-lints allow` switches off `can_emit_warnings` #44627 - Update the libc submodule #44116 - limit and clear cache obligations opportunistically #44269 - clear out projection subobligations after they are processed #43999 - fix logic error in #44269's `prune_cache_value_obligations` #45065 - REVERTS #43543: Cleanup some remains of `hr_lifetime_in_assoc_type` compatibility lint:
This boolean field on the error
Handler
is toggled to silencewarnings when
-A warnings
is passed. (This is actually a separatemechanism from the global lint level—whether there's some redundancy
to be factored away here is an important question, but not one we
concern ourselves with in this commit.) But the same rationale
applies for
--cap-lints allow
. In particular, this makes the "soft"feature-gate warning introduced in 8492ad2 (which is not a lint, but
just calls
struct_span_warn
) not pollute the builds of dependentcrates.
Thanks to @kennytm for pointing out the potential of
can_emit_warnings
for this purpose.Resolves #44213.