Remove mention of exhaustive_patterns from never docs
This commit is contained in:
@@ -127,15 +127,13 @@ mod prim_bool {}
|
|||||||
/// [`Result<String, !>`] which we can unpack like this:
|
/// [`Result<String, !>`] which we can unpack like this:
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(exhaustive_patterns)]
|
|
||||||
/// use std::str::FromStr;
|
/// use std::str::FromStr;
|
||||||
/// let Ok(s) = String::from_str("hello");
|
/// let Ok(s) = String::from_str("hello");
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// Since the [`Err`] variant contains a `!`, it can never occur. If the `exhaustive_patterns`
|
/// Since the [`Err`] variant contains a `!`, it can never occur. This means we can exhaustively
|
||||||
/// feature is present this means we can exhaustively match on [`Result<T, !>`] by just taking the
|
/// match on [`Result<T, !>`] by just taking the [`Ok`] variant. This illustrates another behavior
|
||||||
/// [`Ok`] variant. This illustrates another behavior of `!` - it can be used to "delete" certain
|
/// of `!` - it can be used to "delete" certain enum variants from generic types like `Result`.
|
||||||
/// enum variants from generic types like `Result`.
|
|
||||||
///
|
///
|
||||||
/// ## Infinite loops
|
/// ## Infinite loops
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user