Skip to content

Commit

Permalink
Replace paste with concat
Browse files Browse the repository at this point in the history
  • Loading branch information
blyxyas committed Sep 23, 2024
1 parent d6084f6 commit f18c15c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#![feature(array_windows)]
#![feature(binary_heap_into_iter_sorted)]
#![feature(box_patterns)]
#![feature(macro_metavar_expr_concat)]
#![feature(control_flow_enum)]
#![feature(f128)]
#![feature(f16)]
Expand Down
1 change: 0 additions & 1 deletion clippy_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ arrayvec = { version = "0.7", default-features = false }
itertools = "0.12"
# FIXME(f16_f128): remove when no longer needed for parsing
rustc_apfloat = "0.2.0"
paste = "1.0.15"

[package.metadata.rust-analyzer]
# This crate uses #[feature(rustc_private)]
Expand Down
5 changes: 2 additions & 3 deletions clippy_utils/src/declare_clippy_lint.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// warn on lints, that are included in `rust-lang/rust`s bootstrap
#![warn(rust_2018_idioms, unused_lifetimes)]

pub use paste;

#[macro_export]
#[allow(clippy::crate_in_macro_def)]
macro_rules! declare_clippy_lint {
(@
// $(#[$($attrss:tt)*])*
Expand All @@ -23,7 +22,7 @@ macro_rules! declare_clippy_lint {
}

$crate::paste::paste! {
pub(crate) static [< $lint_name _INFO >]: &'static crate::LintInfo = &crate::LintInfo {
pub(crate) static ${concat($lint_name, _INFO)}: &'static crate::LintInfo = &crate::LintInfo {
lint: &$lint_name,
category: $lintcategory,
explanation: concat!($($lit,"\n",)*),
Expand Down
1 change: 1 addition & 0 deletions clippy_utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#![feature(f128)]
#![feature(f16)]
#![feature(if_let_guard)]
#![feature(macro_metavar_expr_concat)]
#![feature(let_chains)]
#![feature(never_type)]
#![feature(rustc_private)]
Expand Down

0 comments on commit f18c15c

Please sign in to comment.