Skip to content

Commit 87f8a5b

Browse files
committed
Auto merge of #13056 - y21:rm-compiler-lint-functions, r=Manishearth
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
2 parents e64236c + ecbb2d7 commit 87f8a5b

File tree

5 files changed

+4
-79
lines changed

5 files changed

+4
-79
lines changed

clippy.toml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
avoid-breaking-exported-api = false
22

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

clippy_lints/src/declared_lints.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ pub(crate) static LINTS: &[&crate::LintInfo] = &[
88
#[cfg(feature = "internal")]
99
crate::utils::internal_lints::collapsible_calls::COLLAPSIBLE_SPAN_LINT_CALLS_INFO,
1010
#[cfg(feature = "internal")]
11-
crate::utils::internal_lints::compiler_lint_functions::COMPILER_LINT_FUNCTIONS_INFO,
12-
#[cfg(feature = "internal")]
1311
crate::utils::internal_lints::interning_defined_symbol::INTERNING_DEFINED_SYMBOL_INFO,
1412
#[cfg(feature = "internal")]
1513
crate::utils::internal_lints::interning_defined_symbol::UNNECESSARY_SYMBOL_STR_INFO,

clippy_lints/src/lib.rs

-3
Original file line numberDiff line numberDiff line change
@@ -643,9 +643,6 @@ pub fn register_lints(store: &mut rustc_lint::LintStore, conf: &'static Conf) {
643643
});
644644
store.register_early_pass(|| Box::new(utils::internal_lints::produce_ice::ProduceIce));
645645
store.register_late_pass(|_| Box::new(utils::internal_lints::collapsible_calls::CollapsibleCalls));
646-
store.register_late_pass(|_| {
647-
Box::new(utils::internal_lints::compiler_lint_functions::CompilerLintFunctions::new())
648-
});
649646
store.register_late_pass(|_| Box::new(utils::internal_lints::invalid_paths::InvalidPaths));
650647
store.register_late_pass(|_| {
651648
Box::<utils::internal_lints::interning_defined_symbol::InterningDefinedSymbol>::default()

clippy_lints/src/utils/internal_lints.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
pub mod almost_standard_lint_formulation;
22
pub mod collapsible_calls;
3-
pub mod compiler_lint_functions;
43
pub mod interning_defined_symbol;
54
pub mod invalid_paths;
65
pub mod lint_without_lint_pass;

clippy_lints/src/utils/internal_lints/compiler_lint_functions.rs

-73
This file was deleted.

0 commit comments

Comments
 (0)