Skip to content

Commit

Permalink
Auto merge of rust-lang#13056 - y21:rm-compiler-lint-functions, r=Man…
Browse files Browse the repository at this point in the history
…ishearth

Remove internal `compiler_lint_functions` lint

This internal lint has effectively been superseded by `disallowed_methods` when we started using that in rust-lang#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
  • Loading branch information
bors committed Jul 8, 2024
2 parents e64236c + ecbb2d7 commit 87f8a5b
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 79 deletions.
4 changes: 4 additions & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
avoid-breaking-exported-api = false

[[disallowed-methods]]
path = "rustc_lint::context::LintContext::lint"
reason = "this function does not add a link to our documentation, please use the `clippy_utils::diagnostics::span_lint*` functions instead"

[[disallowed-methods]]
path = "rustc_lint::context::LintContext::span_lint"
reason = "this function does not add a link to our documentation, please use the `clippy_utils::diagnostics::span_lint*` functions instead"
Expand Down
2 changes: 0 additions & 2 deletions clippy_lints/src/declared_lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ pub(crate) static LINTS: &[&crate::LintInfo] = &[
#[cfg(feature = "internal")]
crate::utils::internal_lints::collapsible_calls::COLLAPSIBLE_SPAN_LINT_CALLS_INFO,
#[cfg(feature = "internal")]
crate::utils::internal_lints::compiler_lint_functions::COMPILER_LINT_FUNCTIONS_INFO,
#[cfg(feature = "internal")]
crate::utils::internal_lints::interning_defined_symbol::INTERNING_DEFINED_SYMBOL_INFO,
#[cfg(feature = "internal")]
crate::utils::internal_lints::interning_defined_symbol::UNNECESSARY_SYMBOL_STR_INFO,
Expand Down
3 changes: 0 additions & 3 deletions clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -643,9 +643,6 @@ pub fn register_lints(store: &mut rustc_lint::LintStore, conf: &'static Conf) {
});
store.register_early_pass(|| Box::new(utils::internal_lints::produce_ice::ProduceIce));
store.register_late_pass(|_| Box::new(utils::internal_lints::collapsible_calls::CollapsibleCalls));
store.register_late_pass(|_| {
Box::new(utils::internal_lints::compiler_lint_functions::CompilerLintFunctions::new())
});
store.register_late_pass(|_| Box::new(utils::internal_lints::invalid_paths::InvalidPaths));
store.register_late_pass(|_| {
Box::<utils::internal_lints::interning_defined_symbol::InterningDefinedSymbol>::default()
Expand Down
1 change: 0 additions & 1 deletion clippy_lints/src/utils/internal_lints.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
pub mod almost_standard_lint_formulation;
pub mod collapsible_calls;
pub mod compiler_lint_functions;
pub mod interning_defined_symbol;
pub mod invalid_paths;
pub mod lint_without_lint_pass;
Expand Down
73 changes: 0 additions & 73 deletions clippy_lints/src/utils/internal_lints/compiler_lint_functions.rs

This file was deleted.

0 comments on commit 87f8a5b

Please sign in to comment.