Add some convenience helper methods on hir::Safety
This commit is contained in:
parent
3a64bef2ba
commit
8a4e5d7444
27 changed files with 72 additions and 68 deletions
|
@ -84,7 +84,7 @@ pub fn type_allowed_to_implement_copy<'tcx>(
|
|||
return Err(CopyImplementationError::HasDestructor);
|
||||
}
|
||||
|
||||
if impl_safety == hir::Safety::Safe && self_type.has_unsafe_fields() {
|
||||
if impl_safety.is_safe() && self_type.has_unsafe_fields() {
|
||||
return Err(CopyImplementationError::HasUnsafeFields);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue