fix typo in fn() docs

This commit is contained in:
asquared31415 2024-01-12 15:51:18 -05:00 committed by GitHub
parent ce1f2ccf5a
commit 51afc0922c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1605,9 +1605,9 @@ mod prim_ref {}
/// type in the function pointer to the type at the function declaration, and the return value is
/// [`transmute`d][mem::transmute] from the type in the declaration to the type in the
/// pointer. All the usual caveats and concerns around transmutation apply; for instance, if the
/// function expects a `NonNullI32` and the function pointer uses the ABI-compatible type
/// `Option<NonNullI32>`, and the value used for the argument is `None`, then this call is Undefined
/// Behavior since transmuting `None::<NonNullI32>` to `NonNullI32` violates the non-null
/// function expects a `NonZeroI32` and the function pointer uses the ABI-compatible type
/// `Option<NonZeroI32>`, and the value used for the argument is `None`, then this call is Undefined
/// Behavior since transmuting `None::<NonZeroI32>` to `NonZeroI32` violates the non-zero
/// requirement.
///
/// #### Requirements concerning target features