about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>2022-03-18 18:14:34 +0100
committerGitHub <noreply@github.com>2022-03-18 18:14:34 +0100
commit156734dda02737d6462e72163d7a62acd05a6802 (patch)
tree49601c0ae3e4cfb88be91cf91cf1f49ca1d300f7
parenta8adf7685a4ddd16e985d34d9838a75a04ca4181 (diff)
Document that `Option<extern "abi" fn>` discriminant elision applies for any ABI
The current phrasing was not very clear on that aspect.
-rw-r--r--library/core/src/option.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/core/src/option.rs b/library/core/src/option.rs
index de1628f83ad..bcba18a4a3e 100644
--- a/library/core/src/option.rs
+++ b/library/core/src/option.rs
@@ -80,11 +80,13 @@
 //! * [`Box<U>`]
 //! * `&U`
 //! * `&mut U`
-//! * `fn`, `extern "C" fn`
+//! * `fn`, `extern "C" fn`[^extern_fn]
 //! * [`num::NonZero*`]
 //! * [`ptr::NonNull<U>`]
 //! * `#[repr(transparent)]` struct around one of the types in this list.
 //!
+//! [^extern_fn]: this remains true for any other ABI: `extern "abi" fn` (_e.g._, `extern "system" fn`)
+//!
 //! [`Box<U>`]: ../../std/boxed/struct.Box.html
 //! [`num::NonZero*`]: crate::num
 //! [`ptr::NonNull<U>`]: crate::ptr::NonNull