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

only set "overruled by outer forbid" once for lint groups, by group name #42874

Merged
merged 2 commits into from
Jun 27, 2017

Conversation

zackmdavis
Copy link
Member

Previously, conflicting forbid/allow attributes for a lint group would
result in a separate "allow(L) overruled by outer forbid(L)" error for
every lint L in the group. This was needlessly and annoyingly verbose;
we prefer to just have one error pointing out the conflicting
attributes.

(Also, while we're touching context.rs, clean up some unused arguments.)

Resolves #42873.

Long ago, in the before-time, the find_lint method was created with the
unused_variables ("unused_variable" in the singular, as it was called at
the time) attribute in anticipation of using the session and span in the
handling of renamed lints (31b7d64), and indeed, the session and span
came to be used in this method, while the unused_variables attribute
remained (1ad1e2e). In modern times, the session and span are again no
longer used (ca81d3d); it seems we can safely prune them from the
method signature, for justice, and mercy.
@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

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

@zackmdavis zackmdavis force-pushed the overzealous_by_outer_forbid branch from e7a5b6f to 940a02f Compare June 24, 2017 04:33
@zackmdavis
Copy link
Member Author

(force-pushed to fix Travis tidy failure)

Previously, conflicting forbid/allow attributes for a lint group would
result in a separate "allow(L) overruled by outer forbid(L)" error for
every lint L in the group. This was needlessly and annoyingly verbose;
we prefer to just have one error pointing out the conflicting
attributes.

Resolves rust-lang#42873.
@zackmdavis zackmdavis force-pushed the overzealous_by_outer_forbid branch from 940a02f to 890a76f Compare June 24, 2017 05:37
@zackmdavis
Copy link
Member Author

(force-push again to fix Travis compile-fail failure) 😰

@Mark-Simulacrum Mark-Simulacrum added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 24, 2017
Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks nice

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jun 26, 2017

📌 Commit 890a76f has been approved by nikomatsakis

@frewsxcv
Copy link
Member

@bors rollup

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Jun 27, 2017
…bid, r=nikomatsakis

only set "overruled by outer forbid" once for lint groups, by group name

Previously, conflicting forbid/allow attributes for a lint group would
result in a separate "allow(L) overruled by outer forbid(L)" error for
every lint L in the group. This was needlessly and annoyingly verbose;
we prefer to just have one error pointing out the conflicting
attributes.

(Also, while we're touching context.rs, clean up some unused arguments.)

Resolves rust-lang#42873.
bors added a commit that referenced this pull request Jun 27, 2017
Rollup of 5 pull requests

- Successful merges: #42519, #42871, #42874, #42905, #42917
- Failed merges:
@bors bors merged commit 890a76f into rust-lang:master Jun 27, 2017
@zackmdavis zackmdavis deleted the overzealous_by_outer_forbid branch January 13, 2018 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

6 participants