Using f.unsafety() instead of f.skip_binder().unsafety

This commit is contained in:
Enrico Schmitz 2017-03-01 14:46:35 +01:00 committed by Enrico Schmitz
parent 8380dd31da
commit 7e24e1db09

View file

@ -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,
}
}