about summary refs log tree commit diff
path: root/clippy_utils
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2025-05-19 15:11:37 +0000
committerGitHub <noreply@github.com>2025-05-19 15:11:37 +0000
commitebc2a68fe8fc8b3fd51dbe56799fc8c6d45c2402 (patch)
tree8d01a48c6af1e01c907d0b1c4ea1ccdbc86cf4bc /clippy_utils
parentdf33aaf540b24e00b6ad34b11d84c58317660ced (diff)
parent0d25090d262cd506d4c4809f3a534d4d8b318870 (diff)
downloadrust-ebc2a68fe8fc8b3fd51dbe56799fc8c6d45c2402.tar.gz
rust-ebc2a68fe8fc8b3fd51dbe56799fc8c6d45c2402.zip
Add new `useless_concat` lint (#13829)
Fixes #13793.

Interestingly enough, to actually check that the macro call has at least
two arguments, we need to use the rust lexer after getting the original
source code snippet.

changelog: Add new `useless_concat` lint
Diffstat (limited to 'clippy_utils')
-rw-r--r--clippy_utils/src/paths.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/clippy_utils/src/paths.rs b/clippy_utils/src/paths.rs
index e5179e479cc..9d7f3086b05 100644
--- a/clippy_utils/src/paths.rs
+++ b/clippy_utils/src/paths.rs
@@ -129,6 +129,7 @@ path_macros! {
 // Paths in `core`/`alloc`/`std`. This should be avoided and cleaned up by adding diagnostic items.
 pub static ALIGN_OF: PathLookup = value_path!(core::mem::align_of);
 pub static CHAR_TO_DIGIT: PathLookup = value_path!(char::to_digit);
+pub static CONCAT: PathLookup = macro_path!(core::concat);
 pub static IO_ERROR_NEW: PathLookup = value_path!(std::io::Error::new);
 pub static IO_ERRORKIND_OTHER_CTOR: PathLookup = value_path!(std::io::ErrorKind::Other);
 pub static ITER_STEP: PathLookup = type_path!(core::iter::Step);