Skip to content

Commit a5570b9

Browse files
committed
add UnsafeBinder
to the existing function as well
1 parent 4e94fb1 commit a5570b9

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
},
@@ -486,6 +487,7 @@ fn ast_ty_search_pat(ty: &ast::Ty) -> (Pat, Pat) {
486487
},
487488
TyKind::Infer => (Pat::Str("_"), Pat::Str("_")),
488489
TyKind::Paren(ty) => ast_ty_search_pat(ty),
490+
TyKind::UnsafeBinder(binder_ty) => (Pat::Str("unsafe"), ast_ty_search_pat(&binder_ty.inner_ty).1),
489491
TyKind::TraitObject(_, trait_obj_syntax) => {
490492
if let TraitObjectSyntax::Dyn = trait_obj_syntax {
491493
(Pat::Str("dyn"), Pat::Str(""))

0 commit comments

Comments
 (0)