-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Disallow overriding forbid in same scope #77534
Disallow overriding forbid in same scope #77534
Conversation
…ant in the language. (Note that the fact this test existed is a slight sign that we may need a crater run on this bugfix...)
That is, this changes `#[forbid(foo)] #[allow(foo)]` from allowing foo to forbidding foo.
@@ -37,13 +37,5 @@ LL | #![deny(clippy::restriction)] | |||
| | |||
= help: try enabling only the lints you really need | |||
|
|||
error: restriction lints are not meant to be all enabled |
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.
My guess is that the original inclusion here was intended to test that any level of blanket restriction enablement (including forbid) was covered, but given that the code in question blanket covers everything except allow it feels like this should be sufficient (and adding a separate test does not feel worth it).
@bors r+ |
📌 Commit afa2a67 has been approved by |
Rollup of 13 pull requests Successful merges: - rust-lang#76388 (Add a note about the panic behavior of math operations on time objects) - rust-lang#76855 (Revamp rustdoc docs about documentation using `cfg`) - rust-lang#76995 (Reduce boilerplate with the matches! macro) - rust-lang#77228 (Add missing examples for MaybeUninit) - rust-lang#77528 (Avoid unchecked casts in net parser) - rust-lang#77534 (Disallow overriding forbid in same scope) - rust-lang#77555 (Allow anyone to set regression labels) - rust-lang#77558 (Rename bootstrap/defaults/{config.toml.PROFILE => config.PROFILE.toml}) - rust-lang#77559 (Fix rustdoc warnings about invalid Rust syntax) - rust-lang#77560 (Fix LitKind's byte buffer to use refcounted slice) - rust-lang#77573 (Hint doc use convert::identity relative link) - rust-lang#77587 (Fix span for unicode escape suggestion.) - rust-lang#77591 (Record `expansion_that_defined` into crate metadata) Failed merges: r? `@ghost`
…w-override-forbid-in-same-scope, r=petrochenkov Disallow overriding forbid in same scope Rebased rust-lang#73379. Fixes rust-lang#70819.
…ulacrum [beta] backports * Revert rust-lang#77534 fixing rust-lang#77713 on beta, principled fix landed on master * fix soundness issue in `make_contiguous` rust-lang#79814 * Fix exhaustiveness in case a byte string literal is used at slice type rust-lang#79072
Rebased #73379.
Fixes #70819.