Skip to content

Commit 2bd9f98

Browse files
committed
add UnsafeBinder
to the existing function as well
1 parent 41614fc commit 2bd9f98

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clippy_utils/src/check_proc_macro.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ fn ty_search_pat(ty: &Ty<'_>) -> (Pat, Pat) {
406406
TyKind::OpaqueDef(..) => (Pat::Str("impl"), Pat::Str("")),
407407
TyKind::Path(qpath) => qpath_search_pat(&qpath),
408408
TyKind::Infer(()) => (Pat::Str("_"), Pat::Str("_")),
409+
TyKind::UnsafeBinder(binder_ty) => (Pat::Str("unsafe"), ty_search_pat(binder_ty.inner_ty).1),
409410
TyKind::TraitObject(_, tagged_ptr) if let TraitObjectSyntax::Dyn = tagged_ptr.tag() => {
410411
(Pat::Str("dyn"), Pat::Str(""))
411412
},
@@ -499,6 +500,7 @@ fn ast_ty_search_pat(ty: &ast::Ty) -> (Pat, Pat) {
499500
},
500501
TyKind::Infer => (Pat::Str("_"), Pat::Str("_")),
501502
TyKind::Paren(ty) => ast_ty_search_pat(ty),
503+
TyKind::UnsafeBinder(binder_ty) => (Pat::Str("unsafe"), ast_ty_search_pat(&binder_ty.inner_ty).1),
502504
TyKind::TraitObject(_, trait_obj_syntax) => {
503505
if let TraitObjectSyntax::Dyn = trait_obj_syntax {
504506
(Pat::Str("dyn"), Pat::Str(""))

0 commit comments

Comments
 (0)