diff --git a/tests/compile-test.rs b/tests/compile-test.rs index 464efc45c6b4..919c3a0509ca 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -8,7 +8,7 @@ use cargo_metadata::Message; use cargo_metadata::diagnostic::{Applicability, Diagnostic}; use clippy_config::ClippyConfiguration; use clippy_lints::declared_lints::LINTS; -use clippy_lints::deprecated_lints::{DEPRECATED, DEPRECATED_VERSION, RENAMED}; +use clippy_lints::deprecated_lints::RENAMED; use declare_clippy_lint::LintInfo; use pulldown_cmark::{Options, Parser, html}; use serde::Deserialize; @@ -27,7 +27,7 @@ use std::ffi::{OsStr, OsString}; use std::fmt::Write; use std::path::{Path, PathBuf}; use std::sync::mpsc::{Sender, channel}; -use std::{fs, iter, thread}; +use std::{fs, thread}; mod test_utils; @@ -503,10 +503,6 @@ impl DiagnosticCollector { let mut metadata: Vec = LINTS .iter() .map(|lint| LintMetadata::new(lint, &applicabilities, &configs)) - .chain( - iter::zip(DEPRECATED, DEPRECATED_VERSION) - .map(|((lint, reason), version)| LintMetadata::new_deprecated(lint, reason, version)), - ) .collect(); metadata.sort_unstable_by(|a, b| a.id.cmp(&b.id)); @@ -605,28 +601,6 @@ impl LintMetadata { } } - fn new_deprecated(name: &str, reason: &str, version: &'static str) -> Self { - // The reason starts with a lowercase letter and ends without a period. - // This needs to be fixed for the website. - let mut reason = reason.to_owned(); - if let Some(reason) = reason.get_mut(0..1) { - reason.make_ascii_uppercase(); - } - Self { - id: name.strip_prefix("clippy::").unwrap().into(), - id_location: None, - group: "deprecated", - level: "none", - docs: format!( - "### What it does\n\n\ - Nothing. This lint has been deprecated\n\n\ - ### Deprecation reason\n\n{reason}.\n", - ), - version, - applicability: Applicability::Unspecified, - } - } - fn applicability_str(&self) -> &str { match self.applicability { Applicability::MachineApplicable => "MachineApplicable", diff --git a/util/gh-pages/index_template.html b/util/gh-pages/index_template.html index 5d65ea585df6..c3a2059a38f0 100644 --- a/util/gh-pages/index_template.html +++ b/util/gh-pages/index_template.html @@ -82,9 +82,6 @@

Clippy Lints
  • {# #} {# #}
  • {# #} -
  • {# #} - {# #} -
  • {# #}
  • {# #} {# #}
  • {# #} diff --git a/util/gh-pages/script.js b/util/gh-pages/script.js index d32049675319..0a30aaf16fee 100644 --- a/util/gh-pages/script.js +++ b/util/gh-pages/script.js @@ -202,7 +202,6 @@ const GROUPS_FILTER_DEFAULT = { restriction: true, style: true, suspicious: true, - deprecated: false, }; const LEVEL_FILTERS_DEFAULT = { allow: true, @@ -394,28 +393,6 @@ function clearVersionFilters() { } } -function resetGroupsToDefault() { - let needsUpdate = false; - let count = 0; - - onEachLazy(document.querySelectorAll("#lint-groups-selector input"), el => { - const key = el.getAttribute("data-value"); - const value = GROUPS_FILTER_DEFAULT[key]; - if (filters.groups_filter[key] !== value) { - filters.groups_filter[key] = value; - el.checked = value; - needsUpdate = true; - } - if (value) { - count += 1; - } - }); - document.querySelector("#lint-groups .badge").innerText = count; - if (needsUpdate) { - filters.filterLints(); - } -} - function generateListOfOptions(list, elementId, filter) { let html = ''; let nbEnabled = 0; @@ -594,7 +571,7 @@ addListeners(); highlightLazily(); function updateLintCount() { - const allLints = filters.getAllLints().filter(lint => lint.group != "deprecated"); + const allLints = filters.getAllLints(); const totalLints = allLints.length; const countElement = document.getElementById("lint-count"); diff --git a/util/gh-pages/style.css b/util/gh-pages/style.css index 66abf4598b0e..2319ecedf796 100644 --- a/util/gh-pages/style.css +++ b/util/gh-pages/style.css @@ -137,9 +137,6 @@ article:hover .panel-title-name .anchor { display: inline;} .lint-group { min-width: 8em; } -.group-deprecated { - opacity: 0.5; -} .doc-folding { color: #000;