Skip to content

Commit 020116f

Browse files
committed
add UnsafeBinder
to the existing function as well
1 parent f400c35 commit 020116f

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
@@ -403,6 +403,7 @@ fn ty_search_pat(ty: &Ty<'_>) -> (Pat, Pat) {
403403
TyKind::OpaqueDef(..) => (Pat::Str("impl"), Pat::Str("")),
404404
TyKind::Path(qpath) => qpath_search_pat(&qpath),
405405
TyKind::Infer(()) => (Pat::Str("_"), Pat::Str("_")),
406+
TyKind::UnsafeBinder(binder_ty) => (Pat::Str("unsafe"), ty_search_pat(binder_ty.inner_ty).1),
406407
TyKind::TraitObject(_, tagged_ptr) if let TraitObjectSyntax::Dyn = tagged_ptr.tag() => {
407408
(Pat::Str("dyn"), Pat::Str(""))
408409
},
@@ -489,6 +490,7 @@ fn ast_ty_search_pat(ty: &ast::Ty) -> (Pat, Pat) {
489490
},
490491
TyKind::Infer => (Pat::Str("_"), Pat::Str("_")),
491492
TyKind::Paren(ty) => ast_ty_search_pat(ty),
493+
TyKind::UnsafeBinder(binder_ty) => (Pat::Str("unsafe"), ast_ty_search_pat(&binder_ty.inner_ty).1),
492494
TyKind::TraitObject(_, trait_obj_syntax) => {
493495
if let TraitObjectSyntax::Dyn = trait_obj_syntax {
494496
(Pat::Str("dyn"), Pat::Str(""))

0 commit comments

Comments
 (0)