diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index e1c09992ce2..9b888d531d0 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -806,7 +806,7 @@ pub fn same_tys<'a, 'tcx>( pub fn type_is_unsafe_function(ty: ty::Ty) -> bool { match ty.sty { ty::TyFnDef(_, _, f) | - ty::TyFnPtr(f) => f.skip_binder().unsafety == Unsafety::Unsafe, + ty::TyFnPtr(f) => f.unsafety() == Unsafety::Unsafe, _ => false, } }