Skip to content

Commit 205a2d4

Browse files
committed
Replace paste with concat
1 parent f58aae5 commit 205a2d4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

clippy_lints/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#![feature(array_windows)]
22
#![feature(binary_heap_into_iter_sorted)]
33
#![feature(box_patterns)]
4+
#![feature(macro_metavar_expr_concat)]
45
#![feature(control_flow_enum)]
56
#![feature(f128)]
67
#![feature(f16)]

clippy_utils/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ arrayvec = { version = "0.7", default-features = false }
1010
itertools = "0.12"
1111
# FIXME(f16_f128): remove when no longer needed for parsing
1212
rustc_apfloat = "0.2.0"
13-
paste = "1.0.15"
1413

1514
[package.metadata.rust-analyzer]
1615
# This crate uses #[feature(rustc_private)]

clippy_utils/src/declare_clippy_lint.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
// warn on lints, that are included in `rust-lang/rust`s bootstrap
22
#![warn(rust_2018_idioms, unused_lifetimes)]
33

4-
pub use paste;
5-
64
#[macro_export]
5+
#[allow(clippy::crate_in_macro_def)]
76
macro_rules! declare_clippy_lint {
87
(@
98
// $(#[$($attrss:tt)*])*
@@ -23,7 +22,7 @@ macro_rules! declare_clippy_lint {
2322
}
2423

2524
$crate::paste::paste! {
26-
pub(crate) static [< $lint_name _INFO >]: &'static crate::LintInfo = &crate::LintInfo {
25+
pub(crate) static ${concat($lint_name, _INFO)}: &'static crate::LintInfo = &crate::LintInfo {
2726
lint: &$lint_name,
2827
category: $lintcategory,
2928
explanation: concat!($($lit,"\n",)*),

clippy_utils/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#![feature(f128)]
55
#![feature(f16)]
66
#![feature(if_let_guard)]
7+
#![feature(macro_metavar_expr_concat)]
78
#![feature(let_chains)]
89
#![feature(never_type)]
910
#![feature(rustc_private)]

0 commit comments

Comments
 (0)