about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAda Alakbarova <ada.alakbarova@proton.me>2025-08-07 00:34:50 +0200
committerAda Alakbarova <ada.alakbarova@proton.me>2025-08-22 15:03:25 +0200
commit2bd9f98928e051dbb6e065c64410599de6e7f93c (patch)
tree133a262802c58955d0a7531c75789d6cbc688b11
parent41614fcc88d3e11d61f94172537b9c9840a2a970 (diff)
downloadrust-2bd9f98928e051dbb6e065c64410599de6e7f93c.tar.gz
rust-2bd9f98928e051dbb6e065c64410599de6e7f93c.zip
add UnsafeBinder
to the existing function as well
-rw-r--r--clippy_utils/src/check_proc_macro.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/clippy_utils/src/check_proc_macro.rs b/clippy_utils/src/check_proc_macro.rs
index 10f7fe64943..f82c643151e 100644
--- a/clippy_utils/src/check_proc_macro.rs
+++ b/clippy_utils/src/check_proc_macro.rs
@@ -406,6 +406,7 @@ fn ty_search_pat(ty: &Ty<'_>) -> (Pat, Pat) {
         TyKind::OpaqueDef(..) => (Pat::Str("impl"), Pat::Str("")),
         TyKind::Path(qpath) => qpath_search_pat(&qpath),
         TyKind::Infer(()) => (Pat::Str("_"), Pat::Str("_")),
+        TyKind::UnsafeBinder(binder_ty) => (Pat::Str("unsafe"), ty_search_pat(binder_ty.inner_ty).1),
         TyKind::TraitObject(_, tagged_ptr) if let TraitObjectSyntax::Dyn = tagged_ptr.tag() => {
             (Pat::Str("dyn"), Pat::Str(""))
         },
@@ -499,6 +500,7 @@ fn ast_ty_search_pat(ty: &ast::Ty) -> (Pat, Pat) {
         },
         TyKind::Infer => (Pat::Str("_"), Pat::Str("_")),
         TyKind::Paren(ty) => ast_ty_search_pat(ty),
+        TyKind::UnsafeBinder(binder_ty) => (Pat::Str("unsafe"), ast_ty_search_pat(&binder_ty.inner_ty).1),
         TyKind::TraitObject(_, trait_obj_syntax) => {
             if let TraitObjectSyntax::Dyn = trait_obj_syntax {
                 (Pat::Str("dyn"), Pat::Str(""))