Skip to content

Commit 73d33ed

Browse files
committed
Remove mention of exhaustive_patterns from never docs
1 parent 45b40a7 commit 73d33ed

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

library/core/src/primitive_docs.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,13 @@ mod prim_bool {}
127127
/// [`Result<String, !>`] which we can unpack like this:
128128
///
129129
/// ```
130-
/// #![feature(exhaustive_patterns)]
131130
/// use std::str::FromStr;
132131
/// let Ok(s) = String::from_str("hello");
133132
/// ```
134133
///
135-
/// Since the [`Err`] variant contains a `!`, it can never occur. If the `exhaustive_patterns`
136-
/// feature is present this means we can exhaustively match on [`Result<T, !>`] by just taking the
137-
/// [`Ok`] variant. This illustrates another behavior of `!` - it can be used to "delete" certain
138-
/// enum variants from generic types like `Result`.
134+
/// Since the [`Err`] variant contains a `!`, it can never occur. This means we can exhaustively
135+
/// match on [`Result<T, !>`] by just taking the [`Ok`] variant. This illustrates another behavior
136+
/// of `!` - it can be used to "delete" certain enum variants from generic types like `Result`.
139137
///
140138
/// ## Infinite loops
141139
///

0 commit comments

Comments
 (0)