We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b681ac commit 57b59afCopy full SHA for 57b59af
library/core/src/mem/mod.rs
@@ -1045,6 +1045,10 @@ pub const fn discriminant<T>(v: &T) -> Discriminant<T> {
1045
/// return value is unspecified. Equally, if `T` is an enum with more variants than `usize::MAX`
1046
/// the return value is unspecified. Uninhabited variants will be counted.
1047
///
1048
+/// Note that an enum may be expanded with additional variants in the future
1049
+/// as a non-breaking change, for example if it is marked `#[non_exhaustive]`,
1050
+/// which will change the result of this function.
1051
+///
1052
/// # Examples
1053
1054
/// ```
0 commit comments