mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-13 09:05:00 +00:00
Using f.unsafety() instead of f.skip_binder().unsafety
This commit is contained in:
parent
8380dd31da
commit
7e24e1db09
@ -806,7 +806,7 @@ pub fn same_tys<'a, 'tcx>(
|
|||||||
pub fn type_is_unsafe_function(ty: ty::Ty) -> bool {
|
pub fn type_is_unsafe_function(ty: ty::Ty) -> bool {
|
||||||
match ty.sty {
|
match ty.sty {
|
||||||
ty::TyFnDef(_, _, f) |
|
ty::TyFnDef(_, _, f) |
|
||||||
ty::TyFnPtr(f) => f.skip_binder().unsafety == Unsafety::Unsafe,
|
ty::TyFnPtr(f) => f.unsafety() == Unsafety::Unsafe,
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user