Skip to content

Commit 7c0db54

Browse files
committed
document representation of Option<unsafe fn()>
1 parent 52bf0cf commit 7c0db54

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/core/src/option.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,13 @@
130130
//! | [`Box<U>`] (specifically, only `Box<U, Global>`) | when `U: Sized` |
131131
//! | `&U` | when `U: Sized` |
132132
//! | `&mut U` | when `U: Sized` |
133-
//! | `fn`, `extern "C" fn`[^extern_fn] | always |
133+
//! | `fn`, `extern "C" fn`[^extern_fn][^unsafe_fn] | always |
134134
//! | [`num::NonZero*`] | always |
135135
//! | [`ptr::NonNull<U>`] | when `U: Sized` |
136136
//! | `#[repr(transparent)]` struct around one of the types in this list. | when it holds for the inner type |
137137
//!
138138
//! [^extern_fn]: this remains true for any argument/return types and any other ABI: `extern "abi" fn` (_e.g._, `extern "system" fn`)
139+
//! [^unsafe_fn]: this also remains true for the `unsafe` variants `unsafe fn` or `unsafe extern "abi" fn`
139140
//!
140141
//! Under some conditions the above types `T` are also null pointer optimized when wrapped in a [`Result`][result_repr].
141142
//!

0 commit comments

Comments
 (0)