Skip to content

Commit

Permalink
Move to clippy_lints
Browse files Browse the repository at this point in the history
  • Loading branch information
blyxyas committed Sep 11, 2024
1 parent 205a2d4 commit 9b5963d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ macro_rules! declare_clippy_lint {
report_in_external_macro:true
}

$crate::paste::paste! {
pub(crate) static ${concat($lint_name, _INFO)}: &'static crate::LintInfo = &crate::LintInfo {
lint: &$lint_name,
category: $lintcategory,
explanation: concat!($($lit,"\n",)*),
location: concat!(file!(), "#L", line!()),
version: $version_expr
};
}
pub(crate) static ${concat($lint_name, _INFO)}: &'static crate::LintInfo = &crate::LintInfo {
lint: &$lint_name,
category: $lintcategory,
explanation: concat!($($lit,"\n",)*),
location: concat!(file!(), "#L", line!()),
version: $version_expr
};
};
(
$(#[doc = $lit:literal])*
Expand Down
3 changes: 3 additions & 0 deletions clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ extern crate rustc_target;
extern crate rustc_trait_selection;
extern crate thin_vec;

#[macro_use]
mod declare_clippy_lint;

#[macro_use]
extern crate clippy_utils;

Expand Down
5 changes: 0 additions & 5 deletions clippy_utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ pub mod attrs;
mod check_proc_macro;
pub mod comparisons;
pub mod consts;
pub mod declare_clippy_lint;
pub mod diagnostics;
pub mod eager_or_lazy;
pub mod higher;
Expand Down Expand Up @@ -131,10 +130,6 @@ use crate::consts::{mir_to_const, ConstEvalCtxt, Constant};
use crate::higher::Range;
use crate::ty::{adt_and_variant_of_res, can_partially_move_ty, expr_sig, is_copy, is_recursively_primitive_type};
use crate::visitors::for_each_expr_without_closures;

#[doc(hidden)]
pub use paste;

use rustc_middle::hir::nested_filter;

#[macro_export]
Expand Down
1 change: 0 additions & 1 deletion tests/versioncheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ fn consistent_clippy_crate_versions() {
let clippy_version = read_version("Cargo.toml");

let paths = [
"declare_clippy_lint/Cargo.toml",
"clippy_config/Cargo.toml",
"clippy_lints/Cargo.toml",
"clippy_utils/Cargo.toml",
Expand Down

0 comments on commit 9b5963d

Please sign in to comment.