Skip to content
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

Merged
merged 1 commit into from
Sep 21, 2017

Conversation

zackmdavis
Copy link
Member

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.

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.
@rust-highfive
Copy link
Collaborator

r? @pnkfelix

(rust_highfive has picked a reviewer for you, use r? to override)

@zackmdavis
Copy link
Member Author

I would like to nominate this for backporting to beta.

@arielb1 arielb1 added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Sep 17, 2017
@arielb1
Copy link
Contributor

arielb1 commented Sep 17, 2017

r? @nrc (I think, you know how these work? Feel free to reassign).

@arielb1 arielb1 assigned nrc and unassigned pnkfelix Sep 17, 2017
@carols10cents carols10cents added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 18, 2017
@nrc
Copy link
Member

nrc commented Sep 19, 2017

@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.

@bors
Copy link
Contributor

bors commented Sep 19, 2017

📌 Commit d02ceac has been approved by nrc

@bors
Copy link
Contributor

bors commented Sep 21, 2017

⌛ Testing commit d02ceac with merge 35edf7d...

bors added a commit that referenced this pull request Sep 21, 2017
`--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.
@bors
Copy link
Contributor

bors commented Sep 21, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: nrc
Pushing 35edf7d to master...

@bors bors merged commit d02ceac into rust-lang:master Sep 21, 2017
@nikomatsakis nikomatsakis added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Sep 27, 2017
@nikomatsakis
Copy link
Contributor

Marking as beta-accepted. Small issue. cc @rust-lang/compiler

@nikomatsakis
Copy link
Contributor

Backporting now.

This was referenced Sep 28, 2017
@alexcrichton alexcrichton removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Sep 28, 2017
bors added a commit that referenced this pull request Sep 28, 2017
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
bors added a commit that referenced this pull request Oct 7, 2017
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:
@zackmdavis zackmdavis deleted the the_capgate_perogative branch January 13, 2018 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants