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

disallow calls to LintContext::struct_span_lint and TyCtxt::struct_span_lint_hir #11811

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

y21
Copy link
Member

@y21 y21 commented Nov 15, 2023

LintContext::struct_span_lint and TyCtxt::struct_span_lint_hir don't show the link to the clippy documentation, see: #11805

In #11810, the last few calls to those methods were replaced with span_lint_*. It seems like we should just disallow them altogether so that no new code tries to use them.

The existing disallowed_methods lint makes this easy.

changelog: none

@rustbot
Copy link
Collaborator

rustbot commented Nov 15, 2023

r? @Manishearth

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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Nov 15, 2023
@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Nov 15, 2023

📌 Commit 19eec0b has been approved by Manishearth

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Nov 15, 2023

⌛ Testing commit 19eec0b with merge 662ea3f...

@bors
Copy link
Contributor

bors commented Nov 15, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Manishearth
Pushing 662ea3f to master...

1 similar comment
@bors
Copy link
Contributor

bors commented Nov 15, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Manishearth
Pushing 662ea3f to master...

@bors bors merged commit 662ea3f into rust-lang:master Nov 15, 2023
bors added a commit that referenced this pull request Jul 8, 2024
Remove internal `compiler_lint_functions` lint

This internal lint has effectively been superseded by `disallowed_methods` when we started using that in #11811 (I didn't even know that we also had this internal lint at the time of when I created that PR).

Some of the methods that this looks for also don't exist anymore (`span_lint_note` and `span_lint_help`), though there was one that that lint had but wasn't disallowed in clippy.toml (`LintContext::lint`)

changelog: none
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.

4 participants